just-bash 3.6.0 → 3.6.1

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 (887) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +6 -0
  3. package/dist/bin/chunks/awk2-EPZ2CEQT.js +3 -0
  4. package/dist/bin/chunks/base64-D7ZXJQN6.js +3 -0
  5. package/dist/bin/chunks/bash-4Q4RMIZL.js +3 -0
  6. package/dist/bin/chunks/cat-AST5Y57Y.js +3 -0
  7. package/dist/bin/chunks/chmod-BFP7P5CD.js +3 -0
  8. package/dist/bin/chunks/chunk-26O2G5LX.js +34 -0
  9. package/dist/bin/chunks/chunk-2RDKEB6Z.js +15 -0
  10. package/dist/bin/chunks/chunk-35U2THFB.js +3 -0
  11. package/dist/bin/chunks/chunk-3F7UWBEM.js +17 -0
  12. package/dist/bin/chunks/chunk-3WLAERUX.js +3 -0
  13. package/dist/bin/chunks/chunk-3WZIZUMC.js +8 -0
  14. package/dist/bin/chunks/chunk-4ARWO6Y3.js +4 -0
  15. package/dist/bin/chunks/chunk-4HVMRZ5N.js +8 -0
  16. package/dist/bin/chunks/chunk-5AS7PRVN.js +34 -0
  17. package/dist/bin/chunks/chunk-5GYAEVIB.js +10 -0
  18. package/dist/bin/chunks/chunk-5IPYW47P.js +27 -0
  19. package/dist/bin/chunks/chunk-5ZTIV6TI.js +20 -0
  20. package/dist/bin/chunks/chunk-6C2YS7G6.js +14 -0
  21. package/dist/bin/chunks/chunk-74MYVPDY.js +3 -0
  22. package/dist/bin/chunks/chunk-74UP5NWP.js +3 -0
  23. package/dist/bin/chunks/chunk-7DPD5PK3.js +3 -0
  24. package/dist/bin/chunks/chunk-7LJGZPVP.js +18 -0
  25. package/dist/bin/chunks/chunk-7NEXHFSS.js +3 -0
  26. package/dist/bin/chunks/chunk-7XFMCB5C.js +21 -0
  27. package/dist/bin/chunks/chunk-A53Y4KDG.js +7 -0
  28. package/dist/bin/chunks/chunk-AALAYQ6J.js +17 -0
  29. package/dist/bin/chunks/chunk-AM4WIHAG.js +10 -0
  30. package/dist/bin/chunks/chunk-BC5OXEFJ.js +3 -0
  31. package/dist/bin/chunks/chunk-C5ABXV4P.js +15 -0
  32. package/dist/bin/chunks/chunk-CT6P7ILU.js +3 -0
  33. package/dist/bin/chunks/chunk-CYHG3NVG.js +9 -0
  34. package/dist/bin/chunks/chunk-D7PDAJWE.js +7 -0
  35. package/dist/bin/chunks/chunk-DB3G3UVZ.js +5 -0
  36. package/dist/bin/chunks/chunk-EIUU35ZP.js +37 -0
  37. package/dist/bin/chunks/chunk-EMHJNKV5.js +20 -0
  38. package/dist/bin/chunks/chunk-EPWMLTS6.js +9 -0
  39. package/dist/bin/chunks/chunk-F4QFFLWZ.js +8 -0
  40. package/dist/bin/chunks/chunk-F5R5O2Y6.js +9 -0
  41. package/dist/bin/chunks/chunk-FBEYY2HM.js +13 -0
  42. package/dist/bin/chunks/chunk-FIJBWMXU.js +12 -0
  43. package/dist/bin/chunks/chunk-FMVH4N2P.js +5 -0
  44. package/dist/bin/chunks/chunk-G6W2HMNY.js +7 -0
  45. package/dist/bin/chunks/chunk-GFI5BHZX.js +3 -0
  46. package/dist/bin/chunks/chunk-GJAVHEWO.js +143 -0
  47. package/dist/bin/chunks/chunk-GUVSOVQU.js +8 -0
  48. package/dist/bin/chunks/chunk-H22PAKR6.js +3 -0
  49. package/dist/bin/chunks/chunk-HXOJHK2Z.js +8 -0
  50. package/dist/bin/chunks/chunk-IAAYIH44.js +3 -0
  51. package/dist/bin/chunks/chunk-J7W2CRXT.js +7 -0
  52. package/dist/bin/chunks/chunk-JNWWOKCN.js +6 -0
  53. package/dist/bin/chunks/chunk-JQLGE4OW.js +22 -0
  54. package/dist/bin/chunks/chunk-K3U4M4MF.js +7 -0
  55. package/dist/bin/chunks/chunk-KRXYOWIP.js +12 -0
  56. package/dist/bin/chunks/chunk-L4L2QFS4.js +10 -0
  57. package/dist/bin/chunks/chunk-LU6ZEQNN.js +13 -0
  58. package/dist/bin/chunks/chunk-MLMKRR7L.js +12 -0
  59. package/dist/bin/chunks/chunk-MVN5WALS.js +7 -0
  60. package/dist/bin/chunks/chunk-MYOGTYIH.js +22 -0
  61. package/dist/bin/chunks/chunk-NF5LHCVV.js +275 -0
  62. package/dist/bin/chunks/chunk-OUGDZVL6.js +10 -0
  63. package/dist/bin/chunks/chunk-QCNQD6ME.js +11 -0
  64. package/dist/bin/chunks/chunk-QIDBJNMB.js +3 -0
  65. package/dist/bin/chunks/chunk-QKTQYL37.js +9 -0
  66. package/dist/bin/chunks/chunk-R6CMNMNX.js +22 -0
  67. package/dist/bin/chunks/chunk-RCP3WQND.js +7 -0
  68. package/dist/bin/chunks/chunk-RJG4JS32.js +6 -0
  69. package/dist/bin/chunks/chunk-SIMSIBUA.js +13 -0
  70. package/dist/bin/chunks/chunk-TNB7M24H.js +87 -0
  71. package/dist/bin/chunks/chunk-TU6P6AC2.js +4 -0
  72. package/dist/bin/chunks/chunk-TX4WSLXK.js +101 -0
  73. package/dist/bin/chunks/chunk-U4UY6P77.js +3 -0
  74. package/dist/bin/chunks/chunk-U5BNATW4.js +3 -0
  75. package/dist/bin/chunks/chunk-U7VJCJQR.js +16 -0
  76. package/dist/bin/chunks/chunk-VJE2PQW6.js +15 -0
  77. package/dist/bin/chunks/chunk-W4ENG3BR.js +44 -0
  78. package/dist/bin/chunks/chunk-XUFO4QPW.js +65 -0
  79. package/dist/bin/chunks/chunk-XVKL2UZA.js +4 -0
  80. package/dist/bin/chunks/chunk-YCUNLSHF.js +12 -0
  81. package/dist/bin/chunks/chunk-YDH7Q5WV.js +6 -0
  82. package/dist/bin/chunks/chunk-YDWLU56G.js +26 -0
  83. package/dist/bin/chunks/chunk-YILPYZYP.js +16 -0
  84. package/dist/bin/chunks/chunk-YZQ4SVJV.js +13 -0
  85. package/dist/bin/chunks/chunk-ZKLKNN6B.js +3 -0
  86. package/dist/bin/chunks/column-EGAQ7QMC.js +3 -0
  87. package/dist/bin/chunks/comm-JEJ6GWEA.js +3 -0
  88. package/dist/bin/chunks/cp-7AH7TSQ6.js +3 -0
  89. package/dist/bin/chunks/curl-7FCZQCFU.js +31 -0
  90. package/dist/bin/chunks/cut-OVTLUT2B.js +3 -0
  91. package/dist/bin/chunks/date-MKP5YWWY.js +3 -0
  92. package/dist/bin/chunks/diff-R6QTSWD2.js +3 -0
  93. package/dist/bin/chunks/du-M2PB5NUH.js +3 -0
  94. package/dist/bin/chunks/env-EUSAZGWO.js +3 -0
  95. package/dist/bin/chunks/expand-B4CPOZN5.js +3 -0
  96. package/dist/bin/chunks/expr-AQBMSEFL.js +3 -0
  97. package/dist/bin/chunks/file-22CVQBNS.js +3 -0
  98. package/dist/bin/chunks/find-QYLHUYOP.js +3 -0
  99. package/dist/bin/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
  100. package/dist/bin/chunks/fold-E6A5I4DW.js +3 -0
  101. package/dist/bin/chunks/grep-HI55D7F7.js +3 -0
  102. package/dist/bin/chunks/gzip-2GJMVXCF.js +3 -0
  103. package/dist/bin/chunks/head-ZQIB2GSI.js +3 -0
  104. package/dist/bin/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
  105. package/dist/bin/chunks/join-KCYMLQ3V.js +3 -0
  106. package/dist/bin/chunks/jq-KNI4FJIL.js +3 -0
  107. package/dist/bin/chunks/js-exec-OWDAX677.js +1617 -0
  108. package/dist/bin/chunks/ls-QCAGDEDW.js +3 -0
  109. package/dist/bin/chunks/md5sum-OPJ77ZY7.js +3 -0
  110. package/dist/bin/chunks/mkdir-3XFSFVPC.js +3 -0
  111. package/dist/bin/chunks/mktemp-5FA55IJS.js +3 -0
  112. package/dist/bin/chunks/mv-UASF6NAX.js +3 -0
  113. package/dist/bin/chunks/nl-HUDE6DQC.js +3 -0
  114. package/dist/bin/chunks/od-CECQKF5P.js +3 -0
  115. package/dist/bin/chunks/paste-SH5RZ4ZO.js +3 -0
  116. package/dist/bin/chunks/printf-PQKUEWX5.js +3 -0
  117. package/dist/bin/chunks/python3-UE36ZXQT.js +23 -0
  118. package/dist/bin/chunks/readlink-4Z75K3AI.js +3 -0
  119. package/dist/bin/chunks/rev-6SA3VC3J.js +3 -0
  120. package/dist/bin/chunks/rg-ULWB5MQG.js +3 -0
  121. package/dist/bin/chunks/rm-NPIAQT6U.js +3 -0
  122. package/dist/bin/chunks/rmdir-57J3AGQU.js +3 -0
  123. package/dist/bin/chunks/sed-XV7BZPKI.js +3 -0
  124. package/dist/bin/chunks/seq-ZVBT2JEI.js +3 -0
  125. package/dist/bin/chunks/sha1sum-JGOB5K4J.js +3 -0
  126. package/dist/bin/chunks/sha256sum-S5DS6Q6N.js +3 -0
  127. package/dist/bin/chunks/sort-UOMFLGRW.js +3 -0
  128. package/dist/bin/chunks/split-IBL3NIVH.js +3 -0
  129. package/dist/bin/chunks/sqlite3-YIM3BYLS.js +3 -0
  130. package/dist/bin/chunks/stat-RKSIL4YV.js +3 -0
  131. package/dist/bin/chunks/strings-AL7T5GDQ.js +3 -0
  132. package/dist/bin/chunks/tac-36B6LBNS.js +3 -0
  133. package/dist/bin/chunks/tail-G4PLDIOK.js +3 -0
  134. package/dist/bin/chunks/tar-YG6SY2RU.js +3 -0
  135. package/dist/bin/chunks/tee-NP4ULCWD.js +3 -0
  136. package/dist/bin/chunks/time-ZMFJL7MD.js +3 -0
  137. package/dist/bin/chunks/timeout-EJIGKZUX.js +3 -0
  138. package/dist/bin/chunks/touch-YE5LMLLE.js +3 -0
  139. package/dist/bin/chunks/tr-7KFUMSUF.js +3 -0
  140. package/dist/bin/chunks/unexpand-67EBVEPB.js +3 -0
  141. package/dist/bin/chunks/uniq-SZDRNEYK.js +3 -0
  142. package/dist/bin/chunks/wc-VLOME6PL.js +3 -0
  143. package/dist/bin/chunks/xan-FVGJAHFV.js +3 -0
  144. package/dist/bin/chunks/xan-view-LYATQWQB.js +3 -0
  145. package/dist/bin/chunks/xargs-CLQL2WFV.js +3 -0
  146. package/dist/bin/chunks/yes-OOBLAITP.js +3 -0
  147. package/dist/bin/chunks/yq-YQ4YFM26.js +3 -0
  148. package/dist/bin/just-bash.js +347 -345
  149. package/dist/bin/shell/chunks/awk2-EPZ2CEQT.js +3 -0
  150. package/dist/bin/shell/chunks/base64-D7ZXJQN6.js +3 -0
  151. package/dist/bin/shell/chunks/bash-4Q4RMIZL.js +3 -0
  152. package/dist/bin/shell/chunks/cat-AST5Y57Y.js +3 -0
  153. package/dist/bin/shell/chunks/chmod-BFP7P5CD.js +3 -0
  154. package/dist/bin/shell/chunks/chunk-26O2G5LX.js +34 -0
  155. package/dist/bin/shell/chunks/chunk-2RDKEB6Z.js +15 -0
  156. package/dist/bin/shell/chunks/chunk-35U2THFB.js +3 -0
  157. package/dist/bin/shell/chunks/chunk-3F7UWBEM.js +17 -0
  158. package/dist/bin/shell/chunks/chunk-3WLAERUX.js +3 -0
  159. package/dist/bin/shell/chunks/chunk-3WZIZUMC.js +8 -0
  160. package/dist/bin/shell/chunks/chunk-4ARWO6Y3.js +4 -0
  161. package/dist/bin/shell/chunks/chunk-4HVMRZ5N.js +8 -0
  162. package/dist/bin/shell/chunks/chunk-5AS7PRVN.js +34 -0
  163. package/dist/bin/shell/chunks/chunk-5GYAEVIB.js +10 -0
  164. package/dist/bin/shell/chunks/chunk-5IPYW47P.js +27 -0
  165. package/dist/bin/shell/chunks/chunk-5ZTIV6TI.js +20 -0
  166. package/dist/bin/shell/chunks/chunk-6C2YS7G6.js +14 -0
  167. package/dist/bin/shell/chunks/chunk-74MYVPDY.js +3 -0
  168. package/dist/bin/shell/chunks/chunk-74UP5NWP.js +3 -0
  169. package/dist/bin/shell/chunks/chunk-7DPD5PK3.js +3 -0
  170. package/dist/bin/shell/chunks/chunk-7LJGZPVP.js +18 -0
  171. package/dist/bin/shell/chunks/chunk-7NEXHFSS.js +3 -0
  172. package/dist/bin/shell/chunks/chunk-7XFMCB5C.js +21 -0
  173. package/dist/bin/shell/chunks/chunk-A53Y4KDG.js +7 -0
  174. package/dist/bin/shell/chunks/chunk-AALAYQ6J.js +17 -0
  175. package/dist/bin/shell/chunks/chunk-AM4WIHAG.js +10 -0
  176. package/dist/bin/shell/chunks/chunk-BC5OXEFJ.js +3 -0
  177. package/dist/bin/shell/chunks/chunk-C5ABXV4P.js +15 -0
  178. package/dist/bin/shell/chunks/chunk-CT6P7ILU.js +3 -0
  179. package/dist/bin/shell/chunks/chunk-CYHG3NVG.js +9 -0
  180. package/dist/bin/shell/chunks/chunk-D7PDAJWE.js +7 -0
  181. package/dist/bin/shell/chunks/chunk-DB3G3UVZ.js +5 -0
  182. package/dist/bin/shell/chunks/chunk-EIUU35ZP.js +37 -0
  183. package/dist/bin/shell/chunks/chunk-EMHJNKV5.js +20 -0
  184. package/dist/bin/shell/chunks/chunk-EPWMLTS6.js +9 -0
  185. package/dist/bin/shell/chunks/chunk-F4QFFLWZ.js +8 -0
  186. package/dist/bin/shell/chunks/chunk-F5R5O2Y6.js +9 -0
  187. package/dist/bin/shell/chunks/chunk-FBEYY2HM.js +13 -0
  188. package/dist/bin/shell/chunks/chunk-FIJBWMXU.js +12 -0
  189. package/dist/bin/shell/chunks/chunk-FMVH4N2P.js +5 -0
  190. package/dist/bin/shell/chunks/chunk-G6W2HMNY.js +7 -0
  191. package/dist/bin/shell/chunks/chunk-GFI5BHZX.js +3 -0
  192. package/dist/bin/shell/chunks/chunk-GJAVHEWO.js +143 -0
  193. package/dist/bin/shell/chunks/chunk-GUVSOVQU.js +8 -0
  194. package/dist/bin/shell/chunks/chunk-H22PAKR6.js +3 -0
  195. package/dist/bin/shell/chunks/chunk-HXOJHK2Z.js +8 -0
  196. package/dist/bin/shell/chunks/chunk-IAAYIH44.js +3 -0
  197. package/dist/bin/shell/chunks/chunk-J7W2CRXT.js +7 -0
  198. package/dist/bin/shell/chunks/chunk-JNWWOKCN.js +6 -0
  199. package/dist/bin/shell/chunks/chunk-JQLGE4OW.js +22 -0
  200. package/dist/bin/shell/chunks/chunk-K3U4M4MF.js +7 -0
  201. package/dist/bin/shell/chunks/chunk-KRXYOWIP.js +12 -0
  202. package/dist/bin/shell/chunks/chunk-L4L2QFS4.js +10 -0
  203. package/dist/bin/shell/chunks/chunk-LU6ZEQNN.js +13 -0
  204. package/dist/bin/shell/chunks/chunk-MLMKRR7L.js +12 -0
  205. package/dist/bin/shell/chunks/chunk-MVN5WALS.js +7 -0
  206. package/dist/bin/shell/chunks/chunk-MYOGTYIH.js +22 -0
  207. package/dist/bin/shell/chunks/chunk-NF5LHCVV.js +275 -0
  208. package/dist/bin/shell/chunks/chunk-OUGDZVL6.js +10 -0
  209. package/dist/bin/shell/chunks/chunk-QCNQD6ME.js +11 -0
  210. package/dist/bin/shell/chunks/chunk-QIDBJNMB.js +3 -0
  211. package/dist/bin/shell/chunks/chunk-QKTQYL37.js +9 -0
  212. package/dist/bin/shell/chunks/chunk-R6CMNMNX.js +22 -0
  213. package/dist/bin/shell/chunks/chunk-RCP3WQND.js +7 -0
  214. package/dist/bin/shell/chunks/chunk-RJG4JS32.js +6 -0
  215. package/dist/bin/shell/chunks/chunk-SIMSIBUA.js +13 -0
  216. package/dist/bin/shell/chunks/chunk-TNB7M24H.js +87 -0
  217. package/dist/bin/shell/chunks/chunk-TU6P6AC2.js +4 -0
  218. package/dist/bin/shell/chunks/chunk-TX4WSLXK.js +101 -0
  219. package/dist/bin/shell/chunks/chunk-U4UY6P77.js +3 -0
  220. package/dist/bin/shell/chunks/chunk-U5BNATW4.js +3 -0
  221. package/dist/bin/shell/chunks/chunk-U7VJCJQR.js +16 -0
  222. package/dist/bin/shell/chunks/chunk-VJE2PQW6.js +15 -0
  223. package/dist/bin/shell/chunks/chunk-W4ENG3BR.js +44 -0
  224. package/dist/bin/shell/chunks/chunk-XUFO4QPW.js +65 -0
  225. package/dist/bin/shell/chunks/chunk-XVKL2UZA.js +4 -0
  226. package/dist/bin/shell/chunks/chunk-YCUNLSHF.js +12 -0
  227. package/dist/bin/shell/chunks/chunk-YDH7Q5WV.js +6 -0
  228. package/dist/bin/shell/chunks/chunk-YDWLU56G.js +26 -0
  229. package/dist/bin/shell/chunks/chunk-YILPYZYP.js +16 -0
  230. package/dist/bin/shell/chunks/chunk-YZQ4SVJV.js +13 -0
  231. package/dist/bin/shell/chunks/chunk-ZKLKNN6B.js +3 -0
  232. package/dist/bin/shell/chunks/column-EGAQ7QMC.js +3 -0
  233. package/dist/bin/shell/chunks/comm-JEJ6GWEA.js +3 -0
  234. package/dist/bin/shell/chunks/cp-7AH7TSQ6.js +3 -0
  235. package/dist/bin/shell/chunks/curl-7FCZQCFU.js +31 -0
  236. package/dist/bin/shell/chunks/cut-OVTLUT2B.js +3 -0
  237. package/dist/bin/shell/chunks/date-MKP5YWWY.js +3 -0
  238. package/dist/bin/shell/chunks/diff-R6QTSWD2.js +3 -0
  239. package/dist/bin/shell/chunks/du-M2PB5NUH.js +3 -0
  240. package/dist/bin/shell/chunks/env-EUSAZGWO.js +3 -0
  241. package/dist/bin/shell/chunks/expand-B4CPOZN5.js +3 -0
  242. package/dist/bin/shell/chunks/expr-AQBMSEFL.js +3 -0
  243. package/dist/bin/shell/chunks/file-22CVQBNS.js +3 -0
  244. package/dist/bin/shell/chunks/find-QYLHUYOP.js +3 -0
  245. package/dist/bin/shell/chunks/flag-coverage-CTPK5ZWJ.js +3 -0
  246. package/dist/bin/shell/chunks/fold-E6A5I4DW.js +3 -0
  247. package/dist/bin/shell/chunks/grep-HI55D7F7.js +3 -0
  248. package/dist/bin/shell/chunks/gzip-2GJMVXCF.js +3 -0
  249. package/dist/bin/shell/chunks/head-ZQIB2GSI.js +3 -0
  250. package/dist/bin/shell/chunks/html-to-markdown-7ZNLM4SQ.js +3 -0
  251. package/dist/bin/shell/chunks/join-KCYMLQ3V.js +3 -0
  252. package/dist/bin/shell/chunks/jq-KNI4FJIL.js +3 -0
  253. package/dist/bin/shell/chunks/js-exec-OWDAX677.js +1617 -0
  254. package/dist/bin/shell/chunks/ls-QCAGDEDW.js +3 -0
  255. package/dist/bin/shell/chunks/md5sum-OPJ77ZY7.js +3 -0
  256. package/dist/bin/shell/chunks/mkdir-3XFSFVPC.js +3 -0
  257. package/dist/bin/shell/chunks/mktemp-5FA55IJS.js +3 -0
  258. package/dist/bin/shell/chunks/mv-UASF6NAX.js +3 -0
  259. package/dist/bin/shell/chunks/nl-HUDE6DQC.js +3 -0
  260. package/dist/bin/shell/chunks/od-CECQKF5P.js +3 -0
  261. package/dist/bin/shell/chunks/paste-SH5RZ4ZO.js +3 -0
  262. package/dist/bin/shell/chunks/printf-PQKUEWX5.js +3 -0
  263. package/dist/bin/shell/chunks/python3-UE36ZXQT.js +23 -0
  264. package/dist/bin/shell/chunks/readlink-4Z75K3AI.js +3 -0
  265. package/dist/bin/shell/chunks/rev-6SA3VC3J.js +3 -0
  266. package/dist/bin/shell/chunks/rg-ULWB5MQG.js +3 -0
  267. package/dist/bin/shell/chunks/rm-NPIAQT6U.js +3 -0
  268. package/dist/bin/shell/chunks/rmdir-57J3AGQU.js +3 -0
  269. package/dist/bin/shell/chunks/sed-XV7BZPKI.js +3 -0
  270. package/dist/bin/shell/chunks/seq-ZVBT2JEI.js +3 -0
  271. package/dist/bin/shell/chunks/sha1sum-JGOB5K4J.js +3 -0
  272. package/dist/bin/shell/chunks/sha256sum-S5DS6Q6N.js +3 -0
  273. package/dist/bin/shell/chunks/sort-UOMFLGRW.js +3 -0
  274. package/dist/bin/shell/chunks/split-IBL3NIVH.js +3 -0
  275. package/dist/bin/shell/chunks/sqlite3-YIM3BYLS.js +3 -0
  276. package/dist/bin/shell/chunks/stat-RKSIL4YV.js +3 -0
  277. package/dist/bin/shell/chunks/strings-AL7T5GDQ.js +3 -0
  278. package/dist/bin/shell/chunks/tac-36B6LBNS.js +3 -0
  279. package/dist/bin/shell/chunks/tail-G4PLDIOK.js +3 -0
  280. package/dist/bin/shell/chunks/tar-YG6SY2RU.js +3 -0
  281. package/dist/bin/shell/chunks/tee-NP4ULCWD.js +3 -0
  282. package/dist/bin/shell/chunks/time-ZMFJL7MD.js +3 -0
  283. package/dist/bin/shell/chunks/timeout-EJIGKZUX.js +3 -0
  284. package/dist/bin/shell/chunks/touch-YE5LMLLE.js +3 -0
  285. package/dist/bin/shell/chunks/tr-7KFUMSUF.js +3 -0
  286. package/dist/bin/shell/chunks/unexpand-67EBVEPB.js +3 -0
  287. package/dist/bin/shell/chunks/uniq-SZDRNEYK.js +3 -0
  288. package/dist/bin/shell/chunks/wc-VLOME6PL.js +3 -0
  289. package/dist/bin/shell/chunks/xan-FVGJAHFV.js +3 -0
  290. package/dist/bin/shell/chunks/xan-view-LYATQWQB.js +3 -0
  291. package/dist/bin/shell/chunks/xargs-CLQL2WFV.js +3 -0
  292. package/dist/bin/shell/chunks/yes-OOBLAITP.js +3 -0
  293. package/dist/bin/shell/chunks/yq-YQ4YFM26.js +3 -0
  294. package/dist/bin/shell/shell.js +385 -383
  295. package/dist/bundle/browser.js +873 -863
  296. package/dist/bundle/chunks/awk2-LEEKKBPN.js +2 -0
  297. package/dist/bundle/chunks/base64-GBEVK7UP.js +2 -0
  298. package/dist/bundle/chunks/bash-QTX2IUM4.js +2 -0
  299. package/dist/bundle/chunks/cat-UBR2ABBH.js +2 -0
  300. package/dist/bundle/chunks/chmod-5VBARXGU.js +2 -0
  301. package/dist/bundle/chunks/chunk-2LOOLBWC.js +33 -0
  302. package/dist/bundle/chunks/chunk-34XJ6PLO.js +20 -0
  303. package/dist/bundle/chunks/chunk-3DUKINTI.js +7 -0
  304. package/dist/bundle/chunks/chunk-3VXY25LY.js +2 -0
  305. package/dist/bundle/chunks/chunk-5G2D2EZB.js +7 -0
  306. package/dist/bundle/chunks/chunk-5Q4R6KJE.js +4 -0
  307. package/dist/bundle/chunks/chunk-5ZVTEBKG.js +7 -0
  308. package/dist/bundle/chunks/chunk-77XFWF43.js +13 -0
  309. package/dist/bundle/chunks/chunk-B2EYYRZX.js +9 -0
  310. package/dist/bundle/chunks/chunk-BC3VKZCL.js +10 -0
  311. package/dist/bundle/chunks/chunk-BEIP3OYT.js +6 -0
  312. package/dist/bundle/chunks/chunk-BLTFJFWH.js +2 -0
  313. package/dist/bundle/chunks/chunk-C2GCPQ2D.js +15 -0
  314. package/dist/bundle/chunks/chunk-CGCA7SGA.js +25 -0
  315. package/dist/bundle/chunks/chunk-CIY4XCGA.js +2 -0
  316. package/dist/bundle/chunks/chunk-CXBOPNEG.js +11 -0
  317. package/dist/bundle/chunks/chunk-CYJQAYUX.js +142 -0
  318. package/dist/bundle/chunks/chunk-D55UUXDJ.js +100 -0
  319. package/dist/bundle/chunks/chunk-EOMWWW4L.js +33 -0
  320. package/dist/bundle/chunks/chunk-ER6ZGLPS.js +26 -0
  321. package/dist/bundle/chunks/chunk-EZHC6HLV.js +3 -0
  322. package/dist/bundle/chunks/chunk-FBRDM6EM.js +12 -0
  323. package/dist/bundle/chunks/chunk-FDAXSABU.js +11 -0
  324. package/dist/bundle/chunks/chunk-FEKEA5Y2.js +2 -0
  325. package/dist/bundle/chunks/chunk-GEANXVKK.js +15 -0
  326. package/dist/bundle/chunks/chunk-GIQ3LRFL.js +21 -0
  327. package/dist/bundle/chunks/chunk-HBIJBKHP.js +14 -0
  328. package/dist/bundle/chunks/chunk-IDYF47VD.js +11 -0
  329. package/dist/bundle/chunks/chunk-IH6MZAKK.js +6 -0
  330. package/dist/bundle/chunks/chunk-IIWAWB3H.js +274 -0
  331. package/dist/bundle/chunks/chunk-IQGNPH54.js +8 -0
  332. package/dist/bundle/chunks/chunk-IVYY6YFV.js +7 -0
  333. package/dist/bundle/chunks/chunk-IXOG2DXK.js +14 -0
  334. package/dist/bundle/chunks/chunk-J6QAN4PZ.js +6 -0
  335. package/dist/bundle/chunks/chunk-JMGGZYF2.js +2 -0
  336. package/dist/bundle/chunks/chunk-JU5GJH4X.js +9 -0
  337. package/dist/bundle/chunks/chunk-JWGTQTBU.js +16 -0
  338. package/dist/bundle/chunks/chunk-KQSMX4HM.js +11 -0
  339. package/dist/bundle/chunks/chunk-KZMK2KYL.js +43 -0
  340. package/dist/bundle/chunks/chunk-L4MC7WH4.js +14 -0
  341. package/dist/bundle/chunks/chunk-L5AKA7GO.js +5 -0
  342. package/dist/bundle/chunks/chunk-LBKOJW6K.js +2 -0
  343. package/dist/bundle/chunks/chunk-LNJ6EIKX.js +2 -0
  344. package/dist/bundle/chunks/chunk-LQXMSLW5.js +16 -0
  345. package/dist/bundle/chunks/chunk-MOOFDAFS.js +7 -0
  346. package/dist/bundle/chunks/chunk-N3VQQRLQ.js +8 -0
  347. package/dist/bundle/chunks/chunk-NJUHQKMR.js +3 -0
  348. package/dist/bundle/chunks/chunk-NOZTFL4F.js +12 -0
  349. package/dist/bundle/chunks/chunk-OEZKBUXP.js +8 -0
  350. package/dist/bundle/chunks/chunk-OZMQI3HV.js +17 -0
  351. package/dist/bundle/chunks/chunk-POI4XBDP.js +6 -0
  352. package/dist/bundle/chunks/chunk-PV2DCWLJ.js +6 -0
  353. package/dist/bundle/chunks/chunk-Q6ZH76O4.js +2 -0
  354. package/dist/bundle/chunks/chunk-QECDICRF.js +9 -0
  355. package/dist/bundle/chunks/chunk-QJTRVYQA.js +5 -0
  356. package/dist/bundle/chunks/chunk-QZPG6UCH.js +9 -0
  357. package/dist/bundle/chunks/chunk-R23EAHN5.js +2 -0
  358. package/dist/bundle/chunks/chunk-R3HY2GCO.js +3 -0
  359. package/dist/bundle/chunks/chunk-RQTEROQ5.js +6 -0
  360. package/dist/bundle/chunks/chunk-SAE7VUIM.js +21 -0
  361. package/dist/bundle/chunks/chunk-SBG7KYI4.js +12 -0
  362. package/dist/bundle/chunks/chunk-SRNYBHIU.js +21 -0
  363. package/dist/bundle/chunks/chunk-T7CFNHX6.js +2 -0
  364. package/dist/bundle/chunks/chunk-U3UTFNHI.js +2 -0
  365. package/dist/bundle/chunks/chunk-UQZ5HJXB.js +64 -0
  366. package/dist/bundle/chunks/chunk-US6XQQ6W.js +19 -0
  367. package/dist/bundle/chunks/chunk-UZ4TKNEJ.js +2 -0
  368. package/dist/bundle/chunks/chunk-VW6FDS6X.js +2 -0
  369. package/dist/bundle/chunks/chunk-W4A6TADR.js +36 -0
  370. package/dist/bundle/chunks/chunk-WAL3MOLR.js +6 -0
  371. package/dist/bundle/chunks/chunk-WFEUQRHM.js +2 -0
  372. package/dist/bundle/chunks/chunk-WNAEYQTE.js +8 -0
  373. package/dist/bundle/chunks/chunk-WOSSFIAE.js +12 -0
  374. package/dist/bundle/chunks/chunk-WTG3OCY4.js +5 -0
  375. package/dist/bundle/chunks/chunk-XIEMQVCO.js +19 -0
  376. package/dist/bundle/chunks/chunk-YFGP6M45.js +7 -0
  377. package/dist/bundle/chunks/chunk-ZARLSKBF.js +2 -0
  378. package/dist/bundle/chunks/chunk-ZVANIJV2.js +4 -0
  379. package/dist/bundle/chunks/column-46NX3HG3.js +2 -0
  380. package/dist/bundle/chunks/comm-QHEYSM4I.js +2 -0
  381. package/dist/bundle/chunks/cp-AQ4Y4WVV.js +2 -0
  382. package/dist/bundle/chunks/curl-LMCQFYWH.js +30 -0
  383. package/dist/bundle/chunks/cut-A6NXJGOH.js +2 -0
  384. package/dist/bundle/chunks/date-YMEJ62OQ.js +2 -0
  385. package/dist/bundle/chunks/diff-SECJC7CN.js +2 -0
  386. package/dist/bundle/chunks/du-JOLY42MC.js +2 -0
  387. package/dist/bundle/chunks/env-MI6QVNMM.js +2 -0
  388. package/dist/bundle/chunks/expand-YVEZTU7W.js +2 -0
  389. package/dist/bundle/chunks/expr-U7WETT5R.js +2 -0
  390. package/dist/bundle/chunks/file-6QDI3H7G.js +2 -0
  391. package/dist/bundle/chunks/find-UYQIFSZI.js +2 -0
  392. package/dist/bundle/chunks/flag-coverage-5YCE6ILG.js +2 -0
  393. package/dist/bundle/chunks/fold-A24KLKHY.js +2 -0
  394. package/dist/bundle/chunks/grep-ZELVZ7JB.js +2 -0
  395. package/dist/bundle/chunks/gzip-3IFADYVU.js +2 -0
  396. package/dist/bundle/chunks/head-5YWCKNNQ.js +2 -0
  397. package/dist/bundle/chunks/html-to-markdown-EOWI2I5J.js +2 -0
  398. package/dist/bundle/chunks/join-MSZXRLNV.js +2 -0
  399. package/dist/bundle/chunks/jq-MKA6BDYV.js +2 -0
  400. package/dist/bundle/chunks/js-exec-CNDWLKWB.js +1616 -0
  401. package/dist/bundle/chunks/ls-WMN4WCCI.js +2 -0
  402. package/dist/bundle/chunks/md5sum-OCX4NZ2Q.js +2 -0
  403. package/dist/bundle/chunks/mkdir-YJMG55FX.js +2 -0
  404. package/dist/bundle/chunks/mktemp-RA55VAN3.js +2 -0
  405. package/dist/bundle/chunks/mv-NTJL2AHI.js +2 -0
  406. package/dist/bundle/chunks/nl-Z5DVHZ3S.js +2 -0
  407. package/dist/bundle/chunks/od-TRWBMEIO.js +2 -0
  408. package/dist/bundle/chunks/paste-VPYCLIL6.js +2 -0
  409. package/dist/bundle/chunks/printf-BNADL4RX.js +2 -0
  410. package/dist/bundle/chunks/python3-TIKLWPZJ.js +22 -0
  411. package/dist/bundle/chunks/readlink-HGACDFRD.js +2 -0
  412. package/dist/bundle/chunks/rev-W57N4M5B.js +2 -0
  413. package/dist/bundle/chunks/rg-IN3KT335.js +2 -0
  414. package/dist/bundle/chunks/rm-CDVWO5CO.js +2 -0
  415. package/dist/bundle/chunks/rmdir-HI3UE4KQ.js +2 -0
  416. package/dist/bundle/chunks/sed-MXZDFQ7I.js +2 -0
  417. package/dist/bundle/chunks/seq-E3UP3G65.js +2 -0
  418. package/dist/bundle/chunks/sha1sum-QUWYL7G6.js +2 -0
  419. package/dist/bundle/chunks/sha256sum-FGHIABMA.js +2 -0
  420. package/dist/bundle/chunks/sort-ATCMEITA.js +2 -0
  421. package/dist/bundle/chunks/split-YZFCWIZI.js +2 -0
  422. package/dist/bundle/chunks/sqlite3-JL36RFBZ.js +2 -0
  423. package/dist/bundle/chunks/stat-APUQD6WQ.js +2 -0
  424. package/dist/bundle/chunks/strings-WA2ZGNUN.js +2 -0
  425. package/dist/bundle/chunks/tac-OCV6R4TG.js +2 -0
  426. package/dist/bundle/chunks/tail-IBKQAMFW.js +2 -0
  427. package/dist/bundle/chunks/tar-WJV4DGKA.js +2 -0
  428. package/dist/bundle/chunks/tee-VOXQ2UGV.js +2 -0
  429. package/dist/bundle/chunks/time-GOHAC6VO.js +2 -0
  430. package/dist/bundle/chunks/timeout-FVGYB3MD.js +2 -0
  431. package/dist/bundle/chunks/touch-57OKADDG.js +2 -0
  432. package/dist/bundle/chunks/tr-M4D6SICQ.js +2 -0
  433. package/dist/bundle/chunks/unexpand-SYZZ5ZBE.js +2 -0
  434. package/dist/bundle/chunks/uniq-TUUUYPVF.js +2 -0
  435. package/dist/bundle/chunks/wc-HQPGW3KR.js +2 -0
  436. package/dist/bundle/chunks/xan-CZJZCC57.js +2 -0
  437. package/dist/bundle/chunks/xan-view-HETEUD3G.js +2 -0
  438. package/dist/bundle/chunks/xargs-WFPZZ3FK.js +2 -0
  439. package/dist/bundle/chunks/yes-ACSNSE7T.js +2 -0
  440. package/dist/bundle/chunks/yq-XDJLIJPZ.js +2 -0
  441. package/dist/bundle/index.cjs +1042 -993
  442. package/dist/bundle/index.js +345 -343
  443. package/dist/commands/awk/interpreter/fields.d.ts +16 -0
  444. package/dist/commands/js-exec/module-shims.d.ts +1 -1
  445. package/dist/commands/rg/rg-options.d.ts +2 -0
  446. package/dist/commands/search-engine/matcher.d.ts +2 -0
  447. package/dist/interpreter/builtin-dispatch.d.ts +9 -3
  448. package/dist/interpreter/fd-table.d.ts +4 -1
  449. package/dist/interpreter/helpers/errors.d.ts +5 -0
  450. package/dist/interpreter/pipeline-execution.d.ts +1 -1
  451. package/dist/interpreter/redirections.d.ts +25 -10
  452. package/dist/interpreter/types.d.ts +2 -0
  453. package/dist/types.d.ts +15 -0
  454. package/dist/utils/string-builder.d.ts +9 -0
  455. package/package.json +1 -1
  456. package/dist/bin/chunks/awk2-U22OR5B5.js +0 -3
  457. package/dist/bin/chunks/base64-2KKH5BCT.js +0 -3
  458. package/dist/bin/chunks/bash-CFCBBWVH.js +0 -3
  459. package/dist/bin/chunks/cat-V45MVNBT.js +0 -3
  460. package/dist/bin/chunks/chmod-A54R4UUQ.js +0 -3
  461. package/dist/bin/chunks/chunk-2NJJXU4K.js +0 -27
  462. package/dist/bin/chunks/chunk-2YLY6FJA.js +0 -10
  463. package/dist/bin/chunks/chunk-3LKMI5IX.js +0 -34
  464. package/dist/bin/chunks/chunk-3VSWQCPN.js +0 -18
  465. package/dist/bin/chunks/chunk-44SKMHU6.js +0 -16
  466. package/dist/bin/chunks/chunk-5SKEZPTU.js +0 -12
  467. package/dist/bin/chunks/chunk-5SR55TXB.js +0 -16
  468. package/dist/bin/chunks/chunk-6D75E4LV.js +0 -3
  469. package/dist/bin/chunks/chunk-6DAR25KN.js +0 -12
  470. package/dist/bin/chunks/chunk-6SAZRW7E.js +0 -15
  471. package/dist/bin/chunks/chunk-723HNGID.js +0 -13
  472. package/dist/bin/chunks/chunk-7FGDUBSN.js +0 -14
  473. package/dist/bin/chunks/chunk-7X4QBCFW.js +0 -36
  474. package/dist/bin/chunks/chunk-AINNAQBQ.js +0 -6
  475. package/dist/bin/chunks/chunk-AL7RVSF4.js +0 -8
  476. package/dist/bin/chunks/chunk-ARYCSNJJ.js +0 -101
  477. package/dist/bin/chunks/chunk-BCJ42NCM.js +0 -15
  478. package/dist/bin/chunks/chunk-BJF6B4YW.js +0 -22
  479. package/dist/bin/chunks/chunk-BOXG6XBN.js +0 -143
  480. package/dist/bin/chunks/chunk-CPKBPQ2C.js +0 -3
  481. package/dist/bin/chunks/chunk-DA3RFNKK.js +0 -17
  482. package/dist/bin/chunks/chunk-DH7M46D3.js +0 -20
  483. package/dist/bin/chunks/chunk-DTGQQKI2.js +0 -87
  484. package/dist/bin/chunks/chunk-ECZAFQ22.js +0 -9
  485. package/dist/bin/chunks/chunk-ETWDDV6I.js +0 -10
  486. package/dist/bin/chunks/chunk-HFW2LXQV.js +0 -13
  487. package/dist/bin/chunks/chunk-HRKG3ZK2.js +0 -8
  488. package/dist/bin/chunks/chunk-I4IRHQDW.js +0 -3
  489. package/dist/bin/chunks/chunk-IKUY74NG.js +0 -3
  490. package/dist/bin/chunks/chunk-ILXMFIYG.js +0 -7
  491. package/dist/bin/chunks/chunk-IMVXTSPG.js +0 -275
  492. package/dist/bin/chunks/chunk-ISW2U76N.js +0 -17
  493. package/dist/bin/chunks/chunk-K5KT6DMM.js +0 -4
  494. package/dist/bin/chunks/chunk-KG2KXL4Y.js +0 -3
  495. package/dist/bin/chunks/chunk-LCP3IKI7.js +0 -9
  496. package/dist/bin/chunks/chunk-LG6IN6SW.js +0 -34
  497. package/dist/bin/chunks/chunk-LMFAALLO.js +0 -21
  498. package/dist/bin/chunks/chunk-LXFMIXGA.js +0 -3
  499. package/dist/bin/chunks/chunk-M5ZBECGM.js +0 -22
  500. package/dist/bin/chunks/chunk-MA6BMA4M.js +0 -3
  501. package/dist/bin/chunks/chunk-MPQMTLXN.js +0 -3
  502. package/dist/bin/chunks/chunk-MUIYG2RB.js +0 -65
  503. package/dist/bin/chunks/chunk-MYTNZ7MA.js +0 -7
  504. package/dist/bin/chunks/chunk-NGMFI3RH.js +0 -15
  505. package/dist/bin/chunks/chunk-NLMTGTSG.js +0 -11
  506. package/dist/bin/chunks/chunk-O74FSWB4.js +0 -4
  507. package/dist/bin/chunks/chunk-OBVTFHVP.js +0 -7
  508. package/dist/bin/chunks/chunk-OOKVPG5D.js +0 -6
  509. package/dist/bin/chunks/chunk-PL4EU7Y2.js +0 -3
  510. package/dist/bin/chunks/chunk-Q3LE3Y66.js +0 -13
  511. package/dist/bin/chunks/chunk-QCGH2ZOW.js +0 -13
  512. package/dist/bin/chunks/chunk-QKWMWSV3.js +0 -3
  513. package/dist/bin/chunks/chunk-QL33F2W6.js +0 -8
  514. package/dist/bin/chunks/chunk-S5Z7DMIE.js +0 -26
  515. package/dist/bin/chunks/chunk-SQ7SZZMW.js +0 -8
  516. package/dist/bin/chunks/chunk-SQUH76NP.js +0 -3
  517. package/dist/bin/chunks/chunk-TGRZ42DS.js +0 -12
  518. package/dist/bin/chunks/chunk-THTKNRO6.js +0 -7
  519. package/dist/bin/chunks/chunk-TQXLQEIT.js +0 -9
  520. package/dist/bin/chunks/chunk-TZ3S7MY6.js +0 -12
  521. package/dist/bin/chunks/chunk-U6BXPMLD.js +0 -7
  522. package/dist/bin/chunks/chunk-U6DBRMD5.js +0 -5
  523. package/dist/bin/chunks/chunk-URRH3GPG.js +0 -10
  524. package/dist/bin/chunks/chunk-VBU3UEG5.js +0 -7
  525. package/dist/bin/chunks/chunk-VLWZ6L7C.js +0 -4
  526. package/dist/bin/chunks/chunk-VTHA5UK5.js +0 -7
  527. package/dist/bin/chunks/chunk-WBST7XJW.js +0 -9
  528. package/dist/bin/chunks/chunk-WDV2ECOC.js +0 -3
  529. package/dist/bin/chunks/chunk-WEQ5WM2M.js +0 -20
  530. package/dist/bin/chunks/chunk-WFVCEB5T.js +0 -3
  531. package/dist/bin/chunks/chunk-WZ7MIBLR.js +0 -37
  532. package/dist/bin/chunks/chunk-X45GP3AQ.js +0 -3
  533. package/dist/bin/chunks/chunk-XEQ7KSRM.js +0 -5
  534. package/dist/bin/chunks/chunk-YIANER7Y.js +0 -8
  535. package/dist/bin/chunks/chunk-YYZSYLJO.js +0 -6
  536. package/dist/bin/chunks/chunk-Z3KAV6YJ.js +0 -10
  537. package/dist/bin/chunks/chunk-Z5KICK5X.js +0 -22
  538. package/dist/bin/chunks/column-LHHS4D3K.js +0 -3
  539. package/dist/bin/chunks/comm-URDMZCXL.js +0 -3
  540. package/dist/bin/chunks/cp-HPLQA35N.js +0 -3
  541. package/dist/bin/chunks/curl-FIRG3RB6.js +0 -31
  542. package/dist/bin/chunks/cut-KP3S36XS.js +0 -3
  543. package/dist/bin/chunks/date-FJUBX7TJ.js +0 -3
  544. package/dist/bin/chunks/diff-JSJ56EOK.js +0 -3
  545. package/dist/bin/chunks/du-WEF5YWQK.js +0 -3
  546. package/dist/bin/chunks/env-2TSVF4W7.js +0 -3
  547. package/dist/bin/chunks/expand-P6SNTBGZ.js +0 -3
  548. package/dist/bin/chunks/expr-FLWT4OCO.js +0 -3
  549. package/dist/bin/chunks/file-JLUCGBCB.js +0 -3
  550. package/dist/bin/chunks/find-XGVQ6N6L.js +0 -3
  551. package/dist/bin/chunks/flag-coverage-4JYKIAVV.js +0 -3
  552. package/dist/bin/chunks/fold-YEY7X54W.js +0 -3
  553. package/dist/bin/chunks/grep-DCPCPQOS.js +0 -3
  554. package/dist/bin/chunks/gzip-6DZIKNBW.js +0 -3
  555. package/dist/bin/chunks/head-TLFXMM2T.js +0 -3
  556. package/dist/bin/chunks/html-to-markdown-E22RLT2U.js +0 -3
  557. package/dist/bin/chunks/join-UQKXU2QP.js +0 -3
  558. package/dist/bin/chunks/jq-GDM3OBBK.js +0 -3
  559. package/dist/bin/chunks/js-exec-VU6F6WLS.js +0 -1578
  560. package/dist/bin/chunks/ls-67NUUIYT.js +0 -3
  561. package/dist/bin/chunks/md5sum-Z6KAYGDK.js +0 -3
  562. package/dist/bin/chunks/mkdir-AWDWRBKC.js +0 -3
  563. package/dist/bin/chunks/mktemp-L6OGMDUO.js +0 -3
  564. package/dist/bin/chunks/mv-4BJSOT4Y.js +0 -3
  565. package/dist/bin/chunks/nl-XHWFVVKH.js +0 -3
  566. package/dist/bin/chunks/od-SI75GLRE.js +0 -3
  567. package/dist/bin/chunks/paste-5TSIBDF7.js +0 -3
  568. package/dist/bin/chunks/printf-CNXNRQ3I.js +0 -3
  569. package/dist/bin/chunks/python3-GUWCSSDP.js +0 -23
  570. package/dist/bin/chunks/readlink-URO5XTBB.js +0 -3
  571. package/dist/bin/chunks/rev-CZTQCNOZ.js +0 -3
  572. package/dist/bin/chunks/rg-RVULUPDH.js +0 -3
  573. package/dist/bin/chunks/rm-UCUTHC3I.js +0 -3
  574. package/dist/bin/chunks/rmdir-J3HM7GGM.js +0 -3
  575. package/dist/bin/chunks/sed-MCLGHZOI.js +0 -3
  576. package/dist/bin/chunks/seq-I54NZE75.js +0 -3
  577. package/dist/bin/chunks/sha1sum-CATBXX76.js +0 -3
  578. package/dist/bin/chunks/sha256sum-YGSNBVY3.js +0 -3
  579. package/dist/bin/chunks/sort-M3DO25D5.js +0 -3
  580. package/dist/bin/chunks/split-VZO7223N.js +0 -3
  581. package/dist/bin/chunks/sqlite3-HXVFVP4Z.js +0 -3
  582. package/dist/bin/chunks/stat-UJ37RBMM.js +0 -3
  583. package/dist/bin/chunks/strings-J2X2Z6N2.js +0 -3
  584. package/dist/bin/chunks/tac-DG4BMYM5.js +0 -3
  585. package/dist/bin/chunks/tail-5TSF5YM4.js +0 -3
  586. package/dist/bin/chunks/tar-ZGZZDQXO.js +0 -3
  587. package/dist/bin/chunks/tee-L4HKV5PD.js +0 -3
  588. package/dist/bin/chunks/time-J2DAZUIN.js +0 -3
  589. package/dist/bin/chunks/timeout-ATTDYXLX.js +0 -3
  590. package/dist/bin/chunks/touch-TVQAUQOG.js +0 -3
  591. package/dist/bin/chunks/tr-6RPFASYV.js +0 -3
  592. package/dist/bin/chunks/unexpand-JPOQORZF.js +0 -3
  593. package/dist/bin/chunks/uniq-K5VRDP4Q.js +0 -3
  594. package/dist/bin/chunks/wc-VSQBRD6B.js +0 -3
  595. package/dist/bin/chunks/xan-CCS53B7D.js +0 -3
  596. package/dist/bin/chunks/xan-view-KOXASOEV.js +0 -3
  597. package/dist/bin/chunks/xargs-HMISWW4I.js +0 -3
  598. package/dist/bin/chunks/yes-ELH3XQWY.js +0 -3
  599. package/dist/bin/chunks/yq-GSCDUHGM.js +0 -3
  600. package/dist/bin/shell/chunks/awk2-U22OR5B5.js +0 -3
  601. package/dist/bin/shell/chunks/base64-2KKH5BCT.js +0 -3
  602. package/dist/bin/shell/chunks/bash-CFCBBWVH.js +0 -3
  603. package/dist/bin/shell/chunks/cat-V45MVNBT.js +0 -3
  604. package/dist/bin/shell/chunks/chmod-A54R4UUQ.js +0 -3
  605. package/dist/bin/shell/chunks/chunk-2NJJXU4K.js +0 -27
  606. package/dist/bin/shell/chunks/chunk-2YLY6FJA.js +0 -10
  607. package/dist/bin/shell/chunks/chunk-3LKMI5IX.js +0 -34
  608. package/dist/bin/shell/chunks/chunk-3VSWQCPN.js +0 -18
  609. package/dist/bin/shell/chunks/chunk-44SKMHU6.js +0 -16
  610. package/dist/bin/shell/chunks/chunk-5SKEZPTU.js +0 -12
  611. package/dist/bin/shell/chunks/chunk-5SR55TXB.js +0 -16
  612. package/dist/bin/shell/chunks/chunk-6D75E4LV.js +0 -3
  613. package/dist/bin/shell/chunks/chunk-6DAR25KN.js +0 -12
  614. package/dist/bin/shell/chunks/chunk-6SAZRW7E.js +0 -15
  615. package/dist/bin/shell/chunks/chunk-723HNGID.js +0 -13
  616. package/dist/bin/shell/chunks/chunk-7FGDUBSN.js +0 -14
  617. package/dist/bin/shell/chunks/chunk-7X4QBCFW.js +0 -36
  618. package/dist/bin/shell/chunks/chunk-AINNAQBQ.js +0 -6
  619. package/dist/bin/shell/chunks/chunk-AL7RVSF4.js +0 -8
  620. package/dist/bin/shell/chunks/chunk-ARYCSNJJ.js +0 -101
  621. package/dist/bin/shell/chunks/chunk-BCJ42NCM.js +0 -15
  622. package/dist/bin/shell/chunks/chunk-BJF6B4YW.js +0 -22
  623. package/dist/bin/shell/chunks/chunk-BOXG6XBN.js +0 -143
  624. package/dist/bin/shell/chunks/chunk-CPKBPQ2C.js +0 -3
  625. package/dist/bin/shell/chunks/chunk-DA3RFNKK.js +0 -17
  626. package/dist/bin/shell/chunks/chunk-DH7M46D3.js +0 -20
  627. package/dist/bin/shell/chunks/chunk-DTGQQKI2.js +0 -87
  628. package/dist/bin/shell/chunks/chunk-ECZAFQ22.js +0 -9
  629. package/dist/bin/shell/chunks/chunk-ETWDDV6I.js +0 -10
  630. package/dist/bin/shell/chunks/chunk-HFW2LXQV.js +0 -13
  631. package/dist/bin/shell/chunks/chunk-HRKG3ZK2.js +0 -8
  632. package/dist/bin/shell/chunks/chunk-I4IRHQDW.js +0 -3
  633. package/dist/bin/shell/chunks/chunk-IKUY74NG.js +0 -3
  634. package/dist/bin/shell/chunks/chunk-ILXMFIYG.js +0 -7
  635. package/dist/bin/shell/chunks/chunk-IMVXTSPG.js +0 -275
  636. package/dist/bin/shell/chunks/chunk-ISW2U76N.js +0 -17
  637. package/dist/bin/shell/chunks/chunk-K5KT6DMM.js +0 -4
  638. package/dist/bin/shell/chunks/chunk-KG2KXL4Y.js +0 -3
  639. package/dist/bin/shell/chunks/chunk-LCP3IKI7.js +0 -9
  640. package/dist/bin/shell/chunks/chunk-LG6IN6SW.js +0 -34
  641. package/dist/bin/shell/chunks/chunk-LMFAALLO.js +0 -21
  642. package/dist/bin/shell/chunks/chunk-LXFMIXGA.js +0 -3
  643. package/dist/bin/shell/chunks/chunk-M5ZBECGM.js +0 -22
  644. package/dist/bin/shell/chunks/chunk-MA6BMA4M.js +0 -3
  645. package/dist/bin/shell/chunks/chunk-MPQMTLXN.js +0 -3
  646. package/dist/bin/shell/chunks/chunk-MUIYG2RB.js +0 -65
  647. package/dist/bin/shell/chunks/chunk-MYTNZ7MA.js +0 -7
  648. package/dist/bin/shell/chunks/chunk-NGMFI3RH.js +0 -15
  649. package/dist/bin/shell/chunks/chunk-NLMTGTSG.js +0 -11
  650. package/dist/bin/shell/chunks/chunk-O74FSWB4.js +0 -4
  651. package/dist/bin/shell/chunks/chunk-OBVTFHVP.js +0 -7
  652. package/dist/bin/shell/chunks/chunk-OOKVPG5D.js +0 -6
  653. package/dist/bin/shell/chunks/chunk-PL4EU7Y2.js +0 -3
  654. package/dist/bin/shell/chunks/chunk-Q3LE3Y66.js +0 -13
  655. package/dist/bin/shell/chunks/chunk-QCGH2ZOW.js +0 -13
  656. package/dist/bin/shell/chunks/chunk-QKWMWSV3.js +0 -3
  657. package/dist/bin/shell/chunks/chunk-QL33F2W6.js +0 -8
  658. package/dist/bin/shell/chunks/chunk-S5Z7DMIE.js +0 -26
  659. package/dist/bin/shell/chunks/chunk-SQ7SZZMW.js +0 -8
  660. package/dist/bin/shell/chunks/chunk-SQUH76NP.js +0 -3
  661. package/dist/bin/shell/chunks/chunk-TGRZ42DS.js +0 -12
  662. package/dist/bin/shell/chunks/chunk-THTKNRO6.js +0 -7
  663. package/dist/bin/shell/chunks/chunk-TQXLQEIT.js +0 -9
  664. package/dist/bin/shell/chunks/chunk-TZ3S7MY6.js +0 -12
  665. package/dist/bin/shell/chunks/chunk-U6BXPMLD.js +0 -7
  666. package/dist/bin/shell/chunks/chunk-U6DBRMD5.js +0 -5
  667. package/dist/bin/shell/chunks/chunk-URRH3GPG.js +0 -10
  668. package/dist/bin/shell/chunks/chunk-VBU3UEG5.js +0 -7
  669. package/dist/bin/shell/chunks/chunk-VLWZ6L7C.js +0 -4
  670. package/dist/bin/shell/chunks/chunk-VTHA5UK5.js +0 -7
  671. package/dist/bin/shell/chunks/chunk-WBST7XJW.js +0 -9
  672. package/dist/bin/shell/chunks/chunk-WDV2ECOC.js +0 -3
  673. package/dist/bin/shell/chunks/chunk-WEQ5WM2M.js +0 -20
  674. package/dist/bin/shell/chunks/chunk-WFVCEB5T.js +0 -3
  675. package/dist/bin/shell/chunks/chunk-WZ7MIBLR.js +0 -37
  676. package/dist/bin/shell/chunks/chunk-X45GP3AQ.js +0 -3
  677. package/dist/bin/shell/chunks/chunk-XEQ7KSRM.js +0 -5
  678. package/dist/bin/shell/chunks/chunk-YIANER7Y.js +0 -8
  679. package/dist/bin/shell/chunks/chunk-YYZSYLJO.js +0 -6
  680. package/dist/bin/shell/chunks/chunk-Z3KAV6YJ.js +0 -10
  681. package/dist/bin/shell/chunks/chunk-Z5KICK5X.js +0 -22
  682. package/dist/bin/shell/chunks/column-LHHS4D3K.js +0 -3
  683. package/dist/bin/shell/chunks/comm-URDMZCXL.js +0 -3
  684. package/dist/bin/shell/chunks/cp-HPLQA35N.js +0 -3
  685. package/dist/bin/shell/chunks/curl-FIRG3RB6.js +0 -31
  686. package/dist/bin/shell/chunks/cut-KP3S36XS.js +0 -3
  687. package/dist/bin/shell/chunks/date-FJUBX7TJ.js +0 -3
  688. package/dist/bin/shell/chunks/diff-JSJ56EOK.js +0 -3
  689. package/dist/bin/shell/chunks/du-WEF5YWQK.js +0 -3
  690. package/dist/bin/shell/chunks/env-2TSVF4W7.js +0 -3
  691. package/dist/bin/shell/chunks/expand-P6SNTBGZ.js +0 -3
  692. package/dist/bin/shell/chunks/expr-FLWT4OCO.js +0 -3
  693. package/dist/bin/shell/chunks/file-JLUCGBCB.js +0 -3
  694. package/dist/bin/shell/chunks/find-XGVQ6N6L.js +0 -3
  695. package/dist/bin/shell/chunks/flag-coverage-4JYKIAVV.js +0 -3
  696. package/dist/bin/shell/chunks/fold-YEY7X54W.js +0 -3
  697. package/dist/bin/shell/chunks/grep-DCPCPQOS.js +0 -3
  698. package/dist/bin/shell/chunks/gzip-6DZIKNBW.js +0 -3
  699. package/dist/bin/shell/chunks/head-TLFXMM2T.js +0 -3
  700. package/dist/bin/shell/chunks/html-to-markdown-E22RLT2U.js +0 -3
  701. package/dist/bin/shell/chunks/join-UQKXU2QP.js +0 -3
  702. package/dist/bin/shell/chunks/jq-GDM3OBBK.js +0 -3
  703. package/dist/bin/shell/chunks/js-exec-VU6F6WLS.js +0 -1578
  704. package/dist/bin/shell/chunks/ls-67NUUIYT.js +0 -3
  705. package/dist/bin/shell/chunks/md5sum-Z6KAYGDK.js +0 -3
  706. package/dist/bin/shell/chunks/mkdir-AWDWRBKC.js +0 -3
  707. package/dist/bin/shell/chunks/mktemp-L6OGMDUO.js +0 -3
  708. package/dist/bin/shell/chunks/mv-4BJSOT4Y.js +0 -3
  709. package/dist/bin/shell/chunks/nl-XHWFVVKH.js +0 -3
  710. package/dist/bin/shell/chunks/od-SI75GLRE.js +0 -3
  711. package/dist/bin/shell/chunks/paste-5TSIBDF7.js +0 -3
  712. package/dist/bin/shell/chunks/printf-CNXNRQ3I.js +0 -3
  713. package/dist/bin/shell/chunks/python3-GUWCSSDP.js +0 -23
  714. package/dist/bin/shell/chunks/readlink-URO5XTBB.js +0 -3
  715. package/dist/bin/shell/chunks/rev-CZTQCNOZ.js +0 -3
  716. package/dist/bin/shell/chunks/rg-RVULUPDH.js +0 -3
  717. package/dist/bin/shell/chunks/rm-UCUTHC3I.js +0 -3
  718. package/dist/bin/shell/chunks/rmdir-J3HM7GGM.js +0 -3
  719. package/dist/bin/shell/chunks/sed-MCLGHZOI.js +0 -3
  720. package/dist/bin/shell/chunks/seq-I54NZE75.js +0 -3
  721. package/dist/bin/shell/chunks/sha1sum-CATBXX76.js +0 -3
  722. package/dist/bin/shell/chunks/sha256sum-YGSNBVY3.js +0 -3
  723. package/dist/bin/shell/chunks/sort-M3DO25D5.js +0 -3
  724. package/dist/bin/shell/chunks/split-VZO7223N.js +0 -3
  725. package/dist/bin/shell/chunks/sqlite3-HXVFVP4Z.js +0 -3
  726. package/dist/bin/shell/chunks/stat-UJ37RBMM.js +0 -3
  727. package/dist/bin/shell/chunks/strings-J2X2Z6N2.js +0 -3
  728. package/dist/bin/shell/chunks/tac-DG4BMYM5.js +0 -3
  729. package/dist/bin/shell/chunks/tail-5TSF5YM4.js +0 -3
  730. package/dist/bin/shell/chunks/tar-ZGZZDQXO.js +0 -3
  731. package/dist/bin/shell/chunks/tee-L4HKV5PD.js +0 -3
  732. package/dist/bin/shell/chunks/time-J2DAZUIN.js +0 -3
  733. package/dist/bin/shell/chunks/timeout-ATTDYXLX.js +0 -3
  734. package/dist/bin/shell/chunks/touch-TVQAUQOG.js +0 -3
  735. package/dist/bin/shell/chunks/tr-6RPFASYV.js +0 -3
  736. package/dist/bin/shell/chunks/unexpand-JPOQORZF.js +0 -3
  737. package/dist/bin/shell/chunks/uniq-K5VRDP4Q.js +0 -3
  738. package/dist/bin/shell/chunks/wc-VSQBRD6B.js +0 -3
  739. package/dist/bin/shell/chunks/xan-CCS53B7D.js +0 -3
  740. package/dist/bin/shell/chunks/xan-view-KOXASOEV.js +0 -3
  741. package/dist/bin/shell/chunks/xargs-HMISWW4I.js +0 -3
  742. package/dist/bin/shell/chunks/yes-ELH3XQWY.js +0 -3
  743. package/dist/bin/shell/chunks/yq-GSCDUHGM.js +0 -3
  744. package/dist/bundle/chunks/awk2-V7KYQWCD.js +0 -2
  745. package/dist/bundle/chunks/base64-QPSYZAAJ.js +0 -2
  746. package/dist/bundle/chunks/bash-HIEWVHJ2.js +0 -2
  747. package/dist/bundle/chunks/cat-54BXBS6X.js +0 -2
  748. package/dist/bundle/chunks/chmod-4OPV4QKK.js +0 -2
  749. package/dist/bundle/chunks/chunk-2KNTH3KH.js +0 -9
  750. package/dist/bundle/chunks/chunk-2VWG4LDT.js +0 -11
  751. package/dist/bundle/chunks/chunk-2WBUTDF5.js +0 -2
  752. package/dist/bundle/chunks/chunk-3HDTNUL3.js +0 -6
  753. package/dist/bundle/chunks/chunk-3KWM4FFA.js +0 -12
  754. package/dist/bundle/chunks/chunk-4AKAIZPW.js +0 -15
  755. package/dist/bundle/chunks/chunk-4IMUNIUJ.js +0 -21
  756. package/dist/bundle/chunks/chunk-5ATEFZLC.js +0 -4
  757. package/dist/bundle/chunks/chunk-5BMPT6SF.js +0 -19
  758. package/dist/bundle/chunks/chunk-5QWGR2WA.js +0 -21
  759. package/dist/bundle/chunks/chunk-5UTZMNI5.js +0 -64
  760. package/dist/bundle/chunks/chunk-5VCAQBXL.js +0 -17
  761. package/dist/bundle/chunks/chunk-65LVAUWW.js +0 -7
  762. package/dist/bundle/chunks/chunk-6D3WD6YU.js +0 -3
  763. package/dist/bundle/chunks/chunk-6R4OQQWP.js +0 -16
  764. package/dist/bundle/chunks/chunk-6WGIZV3E.js +0 -13
  765. package/dist/bundle/chunks/chunk-72JHTO7E.js +0 -2
  766. package/dist/bundle/chunks/chunk-7GA3QWJJ.js +0 -33
  767. package/dist/bundle/chunks/chunk-7M672HB6.js +0 -21
  768. package/dist/bundle/chunks/chunk-AFFAMSJT.js +0 -14
  769. package/dist/bundle/chunks/chunk-ANCQ4SCV.js +0 -2
  770. package/dist/bundle/chunks/chunk-B3NGH6KE.js +0 -5
  771. package/dist/bundle/chunks/chunk-B5Z5HTFY.js +0 -14
  772. package/dist/bundle/chunks/chunk-B6OSJB22.js +0 -26
  773. package/dist/bundle/chunks/chunk-BM3X75NC.js +0 -36
  774. package/dist/bundle/chunks/chunk-CGI6V2HW.js +0 -11
  775. package/dist/bundle/chunks/chunk-CHHWTPDH.js +0 -3
  776. package/dist/bundle/chunks/chunk-D5ZJISRS.js +0 -11
  777. package/dist/bundle/chunks/chunk-DIRWTBKE.js +0 -19
  778. package/dist/bundle/chunks/chunk-DIWMSSQY.js +0 -2
  779. package/dist/bundle/chunks/chunk-DPZVOEUP.js +0 -6
  780. package/dist/bundle/chunks/chunk-EFORKKSH.js +0 -8
  781. package/dist/bundle/chunks/chunk-EGTVQWAP.js +0 -20
  782. package/dist/bundle/chunks/chunk-EJFBIRMD.js +0 -6
  783. package/dist/bundle/chunks/chunk-EQQGPAXI.js +0 -9
  784. package/dist/bundle/chunks/chunk-EXXOLIVE.js +0 -35
  785. package/dist/bundle/chunks/chunk-FIMO5HLX.js +0 -2
  786. package/dist/bundle/chunks/chunk-FT6ODGOU.js +0 -2
  787. package/dist/bundle/chunks/chunk-FZRQOL3C.js +0 -7
  788. package/dist/bundle/chunks/chunk-GLAFXDZC.js +0 -4
  789. package/dist/bundle/chunks/chunk-GN6CQ3J4.js +0 -2
  790. package/dist/bundle/chunks/chunk-H42OAUJL.js +0 -12
  791. package/dist/bundle/chunks/chunk-H53EPEGD.js +0 -12
  792. package/dist/bundle/chunks/chunk-HDOXCDVK.js +0 -7
  793. package/dist/bundle/chunks/chunk-HIQEVPXM.js +0 -2
  794. package/dist/bundle/chunks/chunk-J2OBOJ64.js +0 -2
  795. package/dist/bundle/chunks/chunk-LVDUF74R.js +0 -7
  796. package/dist/bundle/chunks/chunk-M4LDT7V7.js +0 -6
  797. package/dist/bundle/chunks/chunk-MDE25PQK.js +0 -15
  798. package/dist/bundle/chunks/chunk-MHDZERK4.js +0 -6
  799. package/dist/bundle/chunks/chunk-MHZF23KB.js +0 -33
  800. package/dist/bundle/chunks/chunk-N6W6FM4N.js +0 -8
  801. package/dist/bundle/chunks/chunk-NRLE7KYI.js +0 -6
  802. package/dist/bundle/chunks/chunk-OB46N7Q7.js +0 -2
  803. package/dist/bundle/chunks/chunk-OQ7C4FYO.js +0 -2
  804. package/dist/bundle/chunks/chunk-P5BOIHWV.js +0 -6
  805. package/dist/bundle/chunks/chunk-PPDMRIJ7.js +0 -11
  806. package/dist/bundle/chunks/chunk-PPHGMG47.js +0 -142
  807. package/dist/bundle/chunks/chunk-R6ZGLVXI.js +0 -9
  808. package/dist/bundle/chunks/chunk-RCRHDT54.js +0 -274
  809. package/dist/bundle/chunks/chunk-RIIUVFUS.js +0 -7
  810. package/dist/bundle/chunks/chunk-SQX6WQXB.js +0 -7
  811. package/dist/bundle/chunks/chunk-SRB6FXRH.js +0 -2
  812. package/dist/bundle/chunks/chunk-T4INBNHX.js +0 -8
  813. package/dist/bundle/chunks/chunk-TUQG2YRH.js +0 -5
  814. package/dist/bundle/chunks/chunk-U7UNEMLJ.js +0 -2
  815. package/dist/bundle/chunks/chunk-UHHCL65P.js +0 -3
  816. package/dist/bundle/chunks/chunk-UK2K3DHN.js +0 -8
  817. package/dist/bundle/chunks/chunk-VDJ53ESK.js +0 -9
  818. package/dist/bundle/chunks/chunk-VGCXKMXN.js +0 -10
  819. package/dist/bundle/chunks/chunk-W5DWRFSU.js +0 -2
  820. package/dist/bundle/chunks/chunk-W5J5ADJF.js +0 -100
  821. package/dist/bundle/chunks/chunk-XHFP44Y4.js +0 -5
  822. package/dist/bundle/chunks/chunk-Y32R7EZP.js +0 -25
  823. package/dist/bundle/chunks/chunk-Y62SXZKJ.js +0 -12
  824. package/dist/bundle/chunks/chunk-YUFU7O6I.js +0 -16
  825. package/dist/bundle/chunks/chunk-YZH7FUSY.js +0 -14
  826. package/dist/bundle/chunks/column-F5JDBRV6.js +0 -2
  827. package/dist/bundle/chunks/comm-DTWKU2MC.js +0 -2
  828. package/dist/bundle/chunks/cp-LTFB4EUA.js +0 -2
  829. package/dist/bundle/chunks/curl-XCX2ZQEA.js +0 -30
  830. package/dist/bundle/chunks/cut-IRSHL3BB.js +0 -2
  831. package/dist/bundle/chunks/date-FN2DXAEE.js +0 -2
  832. package/dist/bundle/chunks/diff-VDB6RXHO.js +0 -2
  833. package/dist/bundle/chunks/du-DOWSRLXR.js +0 -2
  834. package/dist/bundle/chunks/env-VUUMB47B.js +0 -2
  835. package/dist/bundle/chunks/expand-2BPPGGSM.js +0 -2
  836. package/dist/bundle/chunks/expr-GZ4DABKB.js +0 -2
  837. package/dist/bundle/chunks/file-UI6QJAAU.js +0 -2
  838. package/dist/bundle/chunks/find-JTXDH3MR.js +0 -2
  839. package/dist/bundle/chunks/flag-coverage-EDO3VM43.js +0 -2
  840. package/dist/bundle/chunks/fold-QJBPHRFJ.js +0 -2
  841. package/dist/bundle/chunks/grep-OZCR76FT.js +0 -2
  842. package/dist/bundle/chunks/gzip-GQC6CWVL.js +0 -2
  843. package/dist/bundle/chunks/head-J6RVJFRS.js +0 -2
  844. package/dist/bundle/chunks/html-to-markdown-7OG5VWYG.js +0 -2
  845. package/dist/bundle/chunks/join-KQ4Z5OD4.js +0 -2
  846. package/dist/bundle/chunks/jq-FCG2IUBK.js +0 -2
  847. package/dist/bundle/chunks/js-exec-NDLXDUBN.js +0 -1577
  848. package/dist/bundle/chunks/ls-MQTYWW4T.js +0 -2
  849. package/dist/bundle/chunks/md5sum-JEDX55KS.js +0 -2
  850. package/dist/bundle/chunks/mkdir-4A5W3RXH.js +0 -2
  851. package/dist/bundle/chunks/mktemp-XKIE5N3X.js +0 -2
  852. package/dist/bundle/chunks/mv-ZPIATQJL.js +0 -2
  853. package/dist/bundle/chunks/nl-RFXH2GNX.js +0 -2
  854. package/dist/bundle/chunks/od-LUHOH7CG.js +0 -2
  855. package/dist/bundle/chunks/paste-U57ZU47S.js +0 -2
  856. package/dist/bundle/chunks/printf-V42QCPHL.js +0 -2
  857. package/dist/bundle/chunks/python3-SDFCGIU4.js +0 -22
  858. package/dist/bundle/chunks/readlink-YNNS6F7K.js +0 -2
  859. package/dist/bundle/chunks/rev-EPOS3MFH.js +0 -2
  860. package/dist/bundle/chunks/rg-F4SX2PHI.js +0 -2
  861. package/dist/bundle/chunks/rm-3XUUYAXQ.js +0 -2
  862. package/dist/bundle/chunks/rmdir-OGSEXEF4.js +0 -2
  863. package/dist/bundle/chunks/sed-MBB5SXGD.js +0 -2
  864. package/dist/bundle/chunks/seq-IN77HD3S.js +0 -2
  865. package/dist/bundle/chunks/sha1sum-BLPZJ6MP.js +0 -2
  866. package/dist/bundle/chunks/sha256sum-VJZ4PHQ4.js +0 -2
  867. package/dist/bundle/chunks/sort-PV2NEQHF.js +0 -2
  868. package/dist/bundle/chunks/split-6R2TSQY6.js +0 -2
  869. package/dist/bundle/chunks/sqlite3-7MBPFI6W.js +0 -2
  870. package/dist/bundle/chunks/stat-YLVJ4L67.js +0 -2
  871. package/dist/bundle/chunks/strings-WTD7Q2EF.js +0 -2
  872. package/dist/bundle/chunks/tac-YXC4HBTR.js +0 -2
  873. package/dist/bundle/chunks/tail-UGFWX3YY.js +0 -2
  874. package/dist/bundle/chunks/tar-BNHPWTOY.js +0 -2
  875. package/dist/bundle/chunks/tee-OOWSWHRQ.js +0 -2
  876. package/dist/bundle/chunks/time-N6J6DC6C.js +0 -2
  877. package/dist/bundle/chunks/timeout-ZHCL5KTP.js +0 -2
  878. package/dist/bundle/chunks/touch-W4DF6Z4T.js +0 -2
  879. package/dist/bundle/chunks/tr-4NGL47UU.js +0 -2
  880. package/dist/bundle/chunks/unexpand-YD5BWFH4.js +0 -2
  881. package/dist/bundle/chunks/uniq-OVOW532K.js +0 -2
  882. package/dist/bundle/chunks/wc-RUR7HE5O.js +0 -2
  883. package/dist/bundle/chunks/xan-7R3I2DJO.js +0 -2
  884. package/dist/bundle/chunks/xan-view-S4ZILLPU.js +0 -2
  885. package/dist/bundle/chunks/xargs-L7TJHOJT.js +0 -2
  886. package/dist/bundle/chunks/yes-I7SAR7XX.js +0 -2
  887. package/dist/bundle/chunks/yq-IOMBQYB2.js +0 -2
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as h}from"./chunk-TU6P6AC2.js";import{a as y,b as w,c as g}from"./chunk-MUFNRCMY.js";var $={name:"date",summary:"display the current time in the given FORMAT",usage:"date [OPTION]... [+FORMAT]",options:["-d, --date=STRING display time described by STRING, not 'now'","-u, --utc print Coordinated Universal Time (UTC)","-I, --iso-8601 output date/time in ISO 8601 format","-R, --rfc-email output RFC 5322 date format"," --help display this help and exit"]};function N(e){try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch{return!1}}function S(e,a){let i=new Intl.DateTimeFormat("en-US",{timeZone:a,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),t=o=>i.find(l=>l.type===o)?.value??"00",r=Number.parseInt(t("hour"),10)%24,s=new Date(`${t("year")}-${t("month")}-${t("day")}T${String(r).padStart(2,"0")}:${t("minute")}:${t("second")}Z`);return Number.isNaN(s.getTime())?null:s}function I(e,a){let i=e.match(/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?$/);if(!i)return null;let[,t,r,s,o="00",l="00",c="00"]=i,p=new Date(`${t}-${r}-${s}T${o}:${l}:${c}Z`);if(Number.isNaN(p.getTime()))return null;try{let u=p;for(let d=0;d<3;d++){let f=S(u,a);if(f===null)return null;let m=f.getTime()-p.getTime();if(m===0)return u;u=new Date(u.getTime()-m)}return u}catch{return null}}function b(e,a){if(e.startsWith("@")){let r=e.slice(1);if(!/^-?\d+$/.test(r))return null;let s=Number(r);if(!Number.isSafeInteger(s))return null;let o=new Date(s*1e3);return Number.isNaN(o.getTime())?null:o}let i=e.toLowerCase().trim();if(i==="now"||i==="today")return new Date;if(i==="yesterday")return new Date(Date.now()-864e5);if(i==="tomorrow")return new Date(Date.now()+864e5);if(a&&!/Z$/i.test(e)&&!/[+-]\d{2}:?\d{2}$/.test(e)){let r=I(e,a);if(r)return r}let t=new Date(e);return Number.isNaN(t.getTime())?null:t}var x={name:"date",async execute(e,a){if(w(e))return y($);let i=!1,t=null,r=null,s=!1,o=!1;for(let m=0;m<e.length;m++){let n=e[m];if(n==="-u"||n==="--utc")i=!0;else if(n==="-d"||n==="--date")t=e[++m]??"";else if(n.startsWith("--date="))t=n.slice(7);else if(n==="-I"||n==="--iso-8601")s=!0;else if(n==="-R"||n==="--rfc-email")o=!0;else if(n.startsWith("+"))r=n.slice(1);else{if(n.startsWith("--"))return g("date",n);if(n.startsWith("-"))for(let T of n.slice(1))if(T==="u")i=!0;else if(T==="I")s=!0;else if(T==="R")o=!0;else return g("date",`-${T}`)}}let l=a.env.get("TZ");l&&!N(l)&&(l=void 0);let c=i?"UTC":l??"UTC",p=t!==null?b(t,l):new Date;if(!p)return{stdout:"",stderr:`date: invalid date '${t}'
4
+ `,exitCode:1};let u=Math.floor(p.getTime()/1e3),d,f={maxOperations:a.limits.maxLoopIterations,maxOutputBytes:Math.min(a.limits.maxStringLength,a.limits.maxOutputSize)-1};return r?d=h(r,u,c,f):s?d=h("%Y-%m-%dT%H:%M:%S%z",u,c,f):o?d=h("%a, %d %b %Y %H:%M:%S %z",u,c,f):d=h("%a %b %e %H:%M:%S %Z %Y",u,c,f),{stdout:`${d}
5
+ `,stderr:"",exitCode:0}}},z={name:"date",flags:[{flag:"-d",type:"value",valueHint:"string"},{flag:"-u",type:"boolean"},{flag:"-I",type:"boolean"},{flag:"-R",type:"boolean"}]};export{x as a,z as b};
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as W}from"./chunk-J5L5DJWL.js";import{c as $}from"./chunk-ABM5WFEO.js";import{b as C}from"./chunk-VGSRQOLD.js";import{a as V}from"./chunk-35U2THFB.js";import{b as I}from"./chunk-GFI5BHZX.js";import{a as x}from"./chunk-7DPD5PK3.js";import{a as B,b}from"./chunk-PBOVSFTJ.js";import{a as N,b as R}from"./chunk-MUFNRCMY.js";import{existsSync as ce}from"node:fs";import{dirname as de,join as T,sep as Q}from"node:path";import{fileURLToPath as me}from"node:url";import{Worker as he}from"node:worker_threads";import pe from"sql.js";function K(e,t){return e==null?Buffer.byteLength(t,"utf8"):e instanceof Uint8Array||Buffer.isBuffer(e)?e.byteLength:Buffer.byteLength(String(e),"utf8")}function X(e,t,r){let n=r.maxOutputSize??Number.MAX_SAFE_INTEGER,s=Buffer.byteLength(r.separator,"utf8");s+=Buffer.byteLength(r.newline,"utf8");for(let a of e)s+=Buffer.byteLength(a,"utf8");for(let a of t){s+=a.length*16;for(let i of a)s+=K(i,r.nullValue);if(s>n)break}let o=s*8+(t.length+3)*(e.length+3)*16;if(!Number.isSafeInteger(o)||o>n)throw new Error(`formatted output exceeds ${n} byte limit`);return n}function _(e,t,r){let n=X(e,t,r),s;switch(r.mode){case"list":s=Y(e,t,r);break;case"csv":s=Z(e,t,r);break;case"json":s=te(e,t);break;case"line":s=re(e,t,r);break;case"column":s=ne(e,t,r);break;case"table":s=se(e,t,r);break;case"markdown":s=oe(e,t,r);break;case"tabs":s=ie(e,t,r);break;case"box":s=ae(e,t,r);break;case"quote":s=le(e,t,r);break;case"html":s=fe(e,t,r);break;case"ascii":s=ue(e,t,r);break}if(Buffer.byteLength(s,"utf8")>n)throw new Error(`formatted output exceeds ${n} byte limit`);return s}function m(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString("utf8"):typeof e=="number"&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,""):String(e)}function Y(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(r.separator));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(r.separator));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function Z(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(v).join(","));for(let s of t)n.push(s.map(o=>v(m(o,r.nullValue))).join(","));return n.length>0?`${n.join(`
4
+ `)}
5
+ `:""}function v(e){return e.includes(",")||e.includes('"')||e.includes("'")||e.includes(`
6
+ `)?`"${e.replace(/"/g,'""')}"`:e}function F(e){return e.toPrecision(17).replace(/\.?0+$/,"")}function ee(e){return e===null?"null":typeof e=="number"?Number.isInteger(e)?String(e):F(e):JSON.stringify(e)}function te(e,t){return t.length===0?"":`[${t.map(n=>`{${e.map((o,a)=>`${JSON.stringify(o)}:${ee(n[a])}`).join(",")}}`).join(`,
7
+ `)}]
8
+ `}function re(e,t,r){if(e.length===0||t.length===0)return"";let n=Math.max(5,...e.map(o=>o.length)),s=[];for(let o of t)for(let a=0;a<e.length;a++){let i=e[a].padStart(n);s.push(`${i} = ${m(o[a],r.nullValue)}`)}return`${s.join(`
9
+ `)}
10
+ `}function ne(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let a=0;a<o.length;a++){let i=m(o[a],r.nullValue).length;i>n[a]&&(n[a]=i)}let s=[];r.header&&(s.push(e.map((o,a)=>o.padEnd(n[a])).join(" ")),s.push(n.map(o=>"-".repeat(o)).join(" ")));for(let o of t)s.push(o.map((a,i)=>m(a,r.nullValue).padEnd(n[i])).join(" "));return s.length>0?`${s.join(`
11
+ `)}
12
+ `:""}function se(e,t,r){if(e.length===0)return"";let n=e.map(a=>a.length);for(let a of t)for(let i=0;i<a.length;i++){let c=m(a[i],r.nullValue).length;c>n[i]&&(n[i]=c)}let s=[],o=`+${n.map(a=>"-".repeat(a+2)).join("+")}+`;s.push(o),r.header&&(s.push(`| ${e.map((a,i)=>a.padEnd(n[i])).join(" | ")} |`),s.push(o));for(let a of t)s.push(`| ${a.map((i,c)=>m(i,r.nullValue).padEnd(n[c])).join(" | ")} |`);return s.push(o),`${s.join(`
13
+ `)}
14
+ `}function oe(e,t,r){if(e.length===0)return"";let n=[];r.header&&(n.push(`| ${e.join(" | ")} |`),n.push(`|${e.map(()=>"---").join("|")}|`));for(let s of t)n.push(`| ${s.map(o=>m(o,r.nullValue)).join(" | ")} |`);return n.length>0?`${n.join(`
15
+ `)}
16
+ `:""}function ie(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.join(" "));for(let s of t)n.push(s.map(o=>m(o,r.nullValue)).join(" "));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function ae(e,t,r){if(e.length===0)return"";let n=e.map(o=>o.length);for(let o of t)for(let a=0;a<o.length;a++){let i=m(o[a],r.nullValue).length;i>n[a]&&(n[a]=i)}let s=[];s.push(`\u250C${n.map(o=>"\u2500".repeat(o+2)).join("\u252C")}\u2510`),s.push(`\u2502 ${e.map((o,a)=>o.padEnd(n[a])).join(" \u2502 ")} \u2502`),s.push(`\u251C${n.map(o=>"\u2500".repeat(o+2)).join("\u253C")}\u2524`);for(let o of t)s.push(`\u2502 ${o.map((a,i)=>m(a,r.nullValue).padEnd(n[i])).join(" \u2502 ")} \u2502`);return s.push(`\u2514${n.map(o=>"\u2500".repeat(o+2)).join("\u2534")}\u2518`),`${s.join(`
17
+ `)}
18
+ `}function le(e,t,r){let n=[];r.header&&e.length>0&&n.push(e.map(P).join(","));for(let s of t)n.push(s.map(P).join(","));return n.length>0?`${n.join(r.newline)}${r.newline}`:""}function P(e){if(e==null)return"NULL";if(e instanceof Uint8Array||Buffer.isBuffer(e))return`X'${Buffer.from(e).toString("hex").toUpperCase()}'`;if(typeof e=="number"){if(Number.isInteger(e))return String(e);if(Number.isFinite(e))return F(e)}return`'${String(e).replace(/'/g,"''")}'`}function fe(e,t,r){let n=[];r.header&&e.length>0&&(n.push(`<TR>${e.map(s=>`<TH>${D(s)}</TH>`).join("")}`),n.push("</TR>"));for(let s of t)n.push(`<TR>${s.map(o=>`<TD>${D(m(o,r.nullValue))}</TD>`).join("")}`),n.push("</TR>");return n.length>0?`${n.join(`
19
+ `)}
20
+ `:""}function D(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function ue(e,t,r){let o=[];r.header&&e.length>0&&o.push(e.join(""));for(let a of t)o.push(a.map(i=>m(i,r.nullValue)).join(""));return o.length>0?o.join("")+"":""}var ge=1024,be=128,we=16,U="Worker termination was not acknowledged";function M(e,t){if(!Number.isSafeInteger(e)||e<0||e>t)throw new Error(`database exceeds ${t} byte limit`)}var O=new WeakMap;async function z(e,t,r){let n=O.get(e);n||(n=new Map,O.set(e,n));let s=n.get(t);if(s||(s={held:!1,waiters:[]},n.set(t,s)),s.poisonedError)throw new Error(s.poisonedError);if(s.held){if(s.waiters.length>=ge)throw new Error("too many concurrent database operations");await new Promise((a,i)=>{let c={signal:r,grant(){r&&c.abort&&r.removeEventListener("abort",c.abort),a()},reject:i};if(r&&(c.abort=()=>{let u=s?.waiters.indexOf(c)??-1;u!==-1&&s?.waiters.splice(u,1),i(new Error("database lock wait aborted"))},r.addEventListener("abort",c.abort,{once:!0}),r.aborted)){c.abort();return}s?.waiters.push(c)})}else s.held=!0;let o=!1;return()=>{if(o||(o=!0,s?.poisonedError))return;let a=s?.waiters.shift();a?a.grant():(s&&(s.held=!1),n?.delete(t))}}async function ye(e,t,r){let n=[];try{for(let s of[...new Set(t)].sort())n.push(await z(e,s,r))}catch(s){for(let o of n.reverse())o();throw s}return()=>{for(let s of n.reverse())s()}}function ke(e,t,r){let n=O.get(e)?.get(t);if(!(!n||n.poisonedError)){n.poisonedError=r;for(let s of n.waiters.splice(0))s.signal&&s.abort&&s.signal.removeEventListener("abort",s.abort),s.reject(new Error(r))}}var Ee={name:"sqlite3",summary:"SQLite database CLI",usage:"sqlite3 [OPTIONS] DATABASE [SQL]",options:["-list output in list mode (default)","-csv output in CSV mode","-json output in JSON mode","-line output in line mode","-column output in column mode","-table output as ASCII table","-markdown output as markdown table","-tabs output in tab-separated mode","-box output in Unicode box mode","-quote output in SQL quote mode","-html output as HTML table","-ascii output in ASCII mode (control chars)","-header show column headers","-noheader hide column headers","-separator SEP field separator for list mode (default: |)","-newline SEP row separator (default: \\n)","-nullvalue TEXT text for NULL values (default: empty)","-readonly open database read-only (no writeback)","-bail stop on first error","-echo print SQL before execution","-cmd COMMAND run SQL command before main SQL","-version show SQLite version","-- end of options","--help show this help"],examples:['sqlite3 :memory: "CREATE TABLE t(x); INSERT INTO t VALUES(1); SELECT * FROM t"','sqlite3 -json data.db "SELECT * FROM users"','sqlite3 -csv -header data.db "SELECT id, name FROM products"','sqlite3 -box data.db "SELECT * FROM users"']};function Se(e){let t={mode:"list",header:!1,separator:"|",newline:`
21
+ `,nullValue:"",readonly:!1,bail:!1,echo:!1,cmd:null},r=null,n=null,s=!1,o=!1;for(let a=0;a<e.length;a++){let i=e[a];if(o){r===null?r=i:n===null&&(n=i);continue}if(i==="--")o=!0;else if(i==="-version")s=!0;else if(i==="-list")t.mode="list";else if(i==="-csv")t.mode="csv";else if(i==="-json")t.mode="json";else if(i==="-line")t.mode="line";else if(i==="-column")t.mode="column";else if(i==="-table")t.mode="table";else if(i==="-markdown")t.mode="markdown";else if(i==="-tabs")t.mode="tabs";else if(i==="-box")t.mode="box";else if(i==="-quote")t.mode="quote";else if(i==="-html")t.mode="html";else if(i==="-ascii")t.mode="ascii";else if(i==="-header")t.header=!0;else if(i==="-noheader")t.header=!1;else if(i==="-readonly")t.readonly=!0;else if(i==="-bail")t.bail=!0;else if(i==="-echo")t.echo=!0;else if(i==="-separator"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -separator
22
+ `,exitCode:1};t.separator=e[++a]}else if(i==="-newline"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -newline
23
+ `,exitCode:1};t.newline=e[++a]}else if(i==="-nullvalue"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -nullvalue
24
+ `,exitCode:1};t.nullValue=e[++a]}else if(i==="-cmd"){if(a+1>=e.length)return{stdout:"",stderr:`sqlite3: Error: missing argument to -cmd
25
+ `,exitCode:1};t.cmd=e[++a]}else{if(i.startsWith("-"))return{stdout:"",stderr:`sqlite3: Error: unknown option: ${i.startsWith("--")?i.slice(1):i}
26
+ Use -help for a list of options.
27
+ `,exitCode:1};r===null?r=i:n===null&&(n=i)}}return{options:t,database:r,sql:n,showVersion:s}}async function Le(){let e=await C.runTrustedAsync(()=>pe()),t=new e.Database;try{let r=t.exec("SELECT sqlite_version()");return r.length>0&&r[0].values.length>0?String(r[0].values[0][0]):"unknown"}finally{t.close()}}function H(e=de(me(import.meta.url))){let t=[T(e,"sqlite3-worker.js"),T(e,"../../commands/sqlite3/worker.js")];(e.endsWith(`${Q}commands${Q}sqlite3`)||e.endsWith("/commands/sqlite3"))&&t.push(T(e,"worker.js")),t.push(T(e,"../../../dist/commands/sqlite3/worker.js"));for(let r of t)if(ce(r))return r;throw new Error("sqlite3 worker not found. Run 'pnpm build' to compile the worker.")}var $e={createWorker(e,t){return new he(e,{workerData:t,resourceLimits:{maxOldGenerationSizeMb:be,maxYoungGenerationSizeMb:we}})},findWorkerPath:H,acquireDatabaseLock:z};function qe(e,t){if(!e||typeof e!="object")return{success:!1,error:"Malformed worker response"};let r=e;return typeof r.protocolToken!="string"||r.protocolToken!==t?{success:!1,error:"Malformed worker response: invalid protocol token"}:r.type==="security-violation"?{success:!1,error:`Security violation: ${typeof r.violation?.type=="string"?r.violation.type:"unknown"}`}:typeof r.success!="boolean"?{success:!1,error:"Malformed worker response: missing success flag"}:r.success?Array.isArray(r.results)?typeof r.hasModifications!="boolean"?{success:!1,error:"Malformed worker response: missing hasModifications flag"}:r.dbBuffer!==null&&r.dbBuffer!==void 0&&!(r.dbBuffer instanceof Uint8Array)?{success:!1,error:"Malformed worker response: invalid dbBuffer"}:{success:!0,results:r.results,hasModifications:r.hasModifications,dbBuffer:r.dbBuffer===void 0?null:r.dbBuffer,defenseStats:r.defenseStats}:{success:!1,error:"Malformed worker response: missing results array"}:{success:!1,error:typeof r.error=="string"&&r.error.length>0?r.error:"Worker execution failed"}}async function je(e,t,r){try{let n=H();return await new Promise(s=>{let o,a=!1,i=!1,c=()=>{!i||!o||(i=!1,o.removeListener?.("message",d),o.removeListener?.("error",p),o.removeListener?.("exit",L))},u=async(l,f)=>{if(a)return;a=!0,c();let g=f?await t.terminate(o):!1;t.close(),s(g?l:{success:!1,error:U})},w=$(r,"sqlite3","worker cancellation callback",l=>{u({success:!1,error:l==="abort"?t.abortMessage():t.timeoutMessage("Query")},!0)});if(t.arm(l=>{try{w(l)}catch(f){u({success:!1,error:b(x(f))},!0)}}),t.isCanceled)return;try{o=C.runTrusted(()=>$e.createWorker(n,e))}catch(l){throw t.close(),l}let y=$(r,"sqlite3","worker message callback",l=>{try{let f=l&&typeof l=="object"?{protocolToken:l.protocolToken,type:l.type,violation:l.violation,success:l.success,error:l.error,results:l.results,hasModifications:l.hasModifications,defenseStats:l.defenseStats}:l;t.assertMessageSize(f,"response"),u(qe(l,e.protocolToken),!0)}catch(f){u({success:!1,error:b(x(f))},!0)}}),S=$(r,"sqlite3","worker error callback",l=>{u({success:!1,error:b(x(l))},!0)}),q=$(r,"sqlite3","worker exit callback",l=>{l!==0&&u({success:!1,error:`Worker exited with code ${l}`},!1)}),d=l=>{try{y(l)}catch(f){let g=f instanceof Error?f.message:String(f);u({success:!1,error:b(g)},!0)}},p=l=>{try{S(l)}catch(f){let g=f instanceof Error?f.message:String(f);u({success:!1,error:b(g)},!0)}},L=l=>{try{q(l)}catch(f){let g=f instanceof Error?f.message:String(f);u({success:!1,error:b(g)},!0)}};o.on("message",d),o.on("error",p),o.on("exit",L),i=!0})}catch(n){let s=b(n.message);throw new Error(`sqlite3 worker failed to load: ${s}`)}}var _e={name:"sqlite3",async execute(e,t){if(R(e)||e.includes("-help"))return N(Ee);let r=Se(e);if("exitCode"in r)return r;let{options:n,database:s,sql:o,showVersion:a}=r;if(a)return{stdout:`${await Le()}
28
+ `,stderr:"",exitCode:0};if(!s)return{stdout:"",stderr:`sqlite3: missing database argument
29
+ `,exitCode:1};let i=o||I(t.stdin).trim();if(n.cmd&&(i=n.cmd+(i?`; ${i}`:"")),!i)return{stdout:"",stderr:`sqlite3: no SQL provided
30
+ `,exitCode:1};let c=s===":memory:",u="",w=[],y=null,S,q;try{if(!c){u=t.fs.resolvePath(t.cwd,s);let d=await V(t.fs,u);if(d.existence==="unknown")throw new Error("database identity cannot be determined safely");if(d.canonicalPath!==void 0&&(u=d.canonicalPath),w=[],d.canonicalPath!==void 0&&w.push(`path:${d.canonicalPath}`),d.existence==="existing"){if(d.stableIdentity===void 0)throw new Error("database identity cannot be determined safely");w.push(`identity:${d.stableIdentity}`)}if(w.length===0)throw new Error("database identity cannot be determined safely");if(S=await ye(t.fsIdentity??t.fs,w,t.signal),await t.fs.exists(u)){let p=await t.fs.stat(u);M(p.size,t.limits.maxDatabaseBytes),y=await t.fs.readFileBuffer(u),M(y.byteLength,t.limits.maxDatabaseBytes),q=t.executionScope?.reserveBytes("sqlite-database",y.byteLength,"sqlite3 database")}}}catch(d){S?.();let p=B(d.message);return{stdout:"",stderr:`sqlite3: unable to open database "${s}": ${p}
31
+ `,exitCode:1}}try{let d=t.limits.maxSqliteTimeoutMs,p=new W({commandName:"sqlite3",timeoutMs:d,signal:t.signal,maxMessageBytes:t.limits.maxWorkerMessageBytes}),L={protocolToken:p.protocolToken,dbBuffer:y,sql:i,options:{bail:n.bail,echo:n.echo},limits:{maxResultRows:t.limits.maxArrayElements,maxResultBytes:t.limits.maxDatabaseResultBytes,maxDatabaseBytes:t.limits.maxDatabaseBytes}};p.assertMessageSize({...L,dbBuffer:void 0},"request");let l,f;try{y&&(M(y.byteLength,t.limits.maxDatabaseBytes),f=t.executionScope?.reserveBytes("sqlite-worker-clone",y.byteLength,"sqlite3 worker clone")),l=await je(L,p,t.requireDefenseContext)}catch(h){return{stdout:"",stderr:`sqlite3: worker error: ${b(h.message)}
32
+ `,exitCode:1}}finally{f?.release()}if(!l.success){if(w.length>0&&l.error===U)for(let k of w)ke(t.fsIdentity??t.fs,k,l.error);return{stdout:"",stderr:`sqlite3: ${b(l.error)}
33
+ `,exitCode:1}}let g=Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),G={mode:n.mode,header:n.header,separator:n.separator,newline:n.newline,nullValue:n.nullValue,maxOutputSize:g},E="";n.echo&&(E+=`${i}
34
+ `);let j="",A=!1;for(let h of l.results)if(h.type==="error"){if(j+=`Error: ${h.error??"SQL error"}
35
+ `,A=!0,n.bail)break}else if(h.columns&&h.rows&&(h.rows.length>0||n.header))try{let k=Math.max(0,g-Buffer.byteLength(E,"utf8"));E+=_(h.columns,h.rows,{...G,maxOutputSize:k})}catch(k){let J=B(k.message);return{stdout:E,stderr:`${j}sqlite3: ${J}
36
+ `,exitCode:1}}if(l.hasModifications&&!n.readonly&&!c&&u&&l.dbBuffer)try{M(l.dbBuffer.byteLength,t.limits.maxDatabaseBytes),await t.fs.writeFile(u,l.dbBuffer)}catch(h){let k=B(h.message);return{stdout:E,stderr:`${j}sqlite3: failed to write database: ${k}
37
+ `,exitCode:1}}return{stdout:E,stderr:j,exitCode:A?1:0}}finally{q?.release(),S?.()}}},Fe={name:"sqlite3",flags:[],needsArgs:!0};export{$e as a,_e as b,Fe as c};
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as Y}from"./chunk-26O2G5LX.js";import{l as U,m as V}from"./chunk-EPWMLTS6.js";function X(t,n){let e=t.ignoreCase?n.toLowerCase():n,i=t.needles;for(let s=0;s<i.length;s++)if(e.indexOf(i[s])!==-1)return!0;return!1}function ee(t,n){return t.replace(/\$(&|\d+|<([^>]+)>)/g,(e,i,s)=>{if(i==="&")return n[0];if(s!==void 0)return n.groups?.[s]??"";let o=parseInt(i,10);return n[o]??""})}function ne(t,n,e={}){let{invertMatch:i=!1,showLineNumbers:s=!1,countOnly:o=!1,countMatches:f=!1,filename:u="",onlyMatching:p=!1,beforeContext:F=0,afterContext:W=0,maxCount:I=0,matchBeyondMaxCount:H=!0,contextSeparator:Q="--",showColumn:z=!1,vimgrep:N=!1,showByteOffset:j=!1,replace:O=null,passthru:T=!1,multiline:Z=!1,kResetGroup:B,preFilter:v,maxWork:b,maxMatches:L,signal:_}=e;if(Z)return ie(t,n,{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:f,filename:u,onlyMatching:p,beforeContext:F,afterContext:W,maxCount:I,contextSeparator:Q,showColumn:z,showByteOffset:j,replace:O,kResetGroup:B,preFilter:v,maxWork:b,maxMatches:L,signal:_});let G=0,M=(l=1)=>{if(_?.aborted)throw new V;if(G+=l,b!==void 0&&G>b)throw new U(`search: matching work limit exceeded (${b})`,"iterations")},A=(l,h)=>{if(L!==void 0&&l.length>=L)throw new U(`search: result limit exceeded (${L})`,"array_elements");l.push(h)},q=1;for(let l=0;l<t.length;l++)if((l&1023)===0&&M(),t.charCodeAt(l)===10&&(q++,L!==void 0&&q>L))throw new U(`search: line limit exceeded (${L})`,"array_elements");let k=t.split(`
4
+ `),R=k.length,P=R>0&&k[R-1]===""?R-1:R;if(o||f){let l=0,h=0,a=(f||p)&&!i;for(let g=0;g<P&&(M(),!(I>0&&h>=I));g++){let w=l,r=k[g];if(!(v&&!i&&!X(v,r))){if(n.lastIndex=0,a)for(let E=n.exec(r);E!==null;E=n.exec(r))M(),l++,E[0].length===0&&n.lastIndex++;else n.test(r)!==i&&l++;l>w&&h++}}return{output:`${u?`${u}:${l}`:String(l)}
5
+ `,matched:l>0,matchCount:l}}if(F===0&&W===0&&!T){let l=[],h=!1,a=0,x=0;for(let g=0;g<P&&(M(),!(I>0&&a>=I));g++){let w=k[g],r=null;if(v&&!X(v,w)||(n.lastIndex=0,r=n.exec(w)),r!==null!==i)if(h=!0,a++,p)for(let $=r;$!==null;$=n.exec(w)){M();let y=B!==void 0?$[B]??"":$[0],D=O!==null?ee(O,$):y,C=u?`${u}:`:"";j&&(C+=`${x+$.index}:`),s&&(C+=`${g+1}:`),z&&(C+=`${$.index+1}:`),A(l,C+D),$[0].length===0&&n.lastIndex++}else if(N)for(let $=r;$!==null;$=n.exec(w)){M();let y=u?`${u}:`:"";j&&(y+=`${x+$.index}:`),s&&(y+=`${g+1}:`),z&&(y+=`${$.index+1}:`),A(l,y+w),$[0].length===0&&n.lastIndex++}else{let $=r?r.index+1:1,y=w;O!==null&&(n.lastIndex=0,y=n.replace(w,(...C)=>{if(C[0].length===0)return"";let K=C,J=C[C.length-1];return typeof J=="object"&&J!==null?(K.groups=J,K.input=C[C.length-2],K.index=C[C.length-3]):(K.input=C[C.length-1],K.index=C[C.length-2]),ee(O,K)}));let D=u?`${u}:`:"";j&&(D+=`${x+(r?r.index:0)}:`),s&&(D+=`${g+1}:`),z&&(D+=`${$}:`),A(l,D+y)}x+=w.length+1}return{output:l.length>0?`${l.join(`
6
+ `)}
7
+ `:"",matched:h,matchCount:a}}if(T){let l=[],h=!1,a=0;for(let x=0;x<P;x++){M();let g=k[x],w;v&&!X(v,g)?w=!1:(n.lastIndex=0,w=n.test(g));let r=w!==i;r&&(h=!0,a++);let E=r?":":"-",$=u?`${u}${E}`:"";s&&($+=`${x+1}${E}`),A(l,$+g)}return{output:l.length>0?`${l.join(`
8
+ `)}
9
+ `:"",matched:h,matchCount:a}}let S=[],c=0,d=-1,m=[];for(let l=0;l<P&&(M(),!(I>0&&c>=I));l++){let h=k[l],a;if(v&&!X(v,h)?a=!1:(n.lastIndex=0,a=n.test(h)),a!==i){if(L!==void 0&&m.length>=L)throw new U(`search: match limit exceeded (${L})`,"array_elements");m.push(l),c++}}for(let l of m){M();let h=Math.max(0,l-F);d>=0&&h>d+1&&A(S,Q);let a=Math.min(P-1,l+W);for(let x=Math.max(h,d+1);x<=a;x++){M(),d=x;let g=k[x];n.lastIndex=0;let w=(H||x<=m[m.length-1])&&n.test(g)!==i;if(w&&p){n.lastIndex=0;for(let r=n.exec(g);r!==null;r=n.exec(g)){M();let E=B!==void 0?r[B]??"":r[0],$=O!==null?O:E,y=u?`${u}:`:"";s&&(y+=`${x+1}:`),z&&(y+=`${r.index+1}:`),A(S,y+$),r[0].length===0&&n.lastIndex++}}else{let r=g,E=w?":":"-";s&&(r=`${x+1}${E}${r}`),u&&(r=`${u}${E}${r}`),A(S,r)}}}return{output:S.length>0?`${S.join(`
10
+ `)}
11
+ `:"",matched:c>0,matchCount:c}}function ie(t,n,e){let{invertMatch:i,showLineNumbers:s,countOnly:o,countMatches:f,filename:u,onlyMatching:p,beforeContext:F,afterContext:W,maxCount:I,contextSeparator:H,showColumn:Q,showByteOffset:z,replace:N,kResetGroup:j,preFilter:O,maxWork:T,maxMatches:Z,signal:B}=e,v=0,b=(c=1)=>{if(B?.aborted)throw new V;if(v+=c,T!==void 0&&v>T)throw new U(`search: matching work limit exceeded (${T})`,"iterations")};if(O&&!i&&!X(O,t))return o||f?{output:`${u?`${u}:0`:"0"}
12
+ `,matched:!1,matchCount:0}:{output:"",matched:!1,matchCount:0};let L=[0];for(let c=0;c<t.length;c++)if((c&1023)===0&&b(),t[c]===`
13
+ `){if(Z!==void 0&&L.length>=Z)throw new U(`search: line index limit exceeded (${Z})`,"array_elements");L.push(c+1)}let _=t.split(`
14
+ `),G=_.length,M=G>0&&_[G-1]===""?G-1:G,A=c=>{let d=0,m=L.length;for(;d<m;){let l=d+Math.floor((m-d)/2);L[l]<=c?d=l+1:m=l}return Math.max(0,d-1)},q=c=>{let d=A(c);return c-L[d]+1};if(o||f){let c=0,d=0,m=-1;n.lastIndex=0;for(let a=n.exec(t);a!==null&&(b(),!(I>0&&c>=I));a=n.exec(t)){if(c++,!f){let x=A(a.index),g=A(a.index+Math.max(0,a[0].length-1)),w=Math.max(x,m+1);w<=g&&(d+=g-w+1,m=g)}a[0].length===0&&n.lastIndex++}let l=f?i?0:c:i?M-d:d;return{output:`${u?`${u}:${l}`:String(l)}
15
+ `,matched:l>0,matchCount:l}}let k=[];n.lastIndex=0;for(let c=n.exec(t);c!==null&&(b(),!(I>0&&k.length>=I));c=n.exec(t)){if(Z!==void 0&&k.length>=Z)throw new U(`search: match limit exceeded (${Z})`,"array_elements");let d=A(c.index),m=A(c.index+Math.max(0,c[0].length-1)),l=j!==void 0?c[j]??"":c[0];k.push({startLine:d,endLine:m,byteOffset:c.index,column:q(c.index),matchText:l}),c[0].length===0&&n.lastIndex++}if(i){let c=new Set;for(let m of k)for(let l=m.startLine;l<=m.endLine;l++)b(),c.add(l);let d=[];for(let m=0;m<M;m++)if(b(),!c.has(m)){let l=_[m];s&&(l=`${m+1}:${l}`),u&&(l=`${u}:${l}`),d.push(l)}return{output:d.length>0?`${d.join(`
16
+ `)}
17
+ `:"",matched:d.length>0,matchCount:d.length}}if(k.length===0)return{output:"",matched:!1,matchCount:0};let R=new Set,P=-1,S=[];for(let c of k){b();let d=Math.max(0,c.startLine-F),m=Math.min(M-1,c.endLine+W);P>=0&&d>P+1&&S.push(H);for(let l=d;l<c.startLine;l++)if(b(),!R.has(l)){R.add(l),P=l;let h=_[l];s&&(h=`${l+1}-${h}`),u&&(h=`${u}-${h}`),S.push(h)}if(p){let l=N!==null?N:c.matchText,h=u?`${u}:`:"";z&&(h+=`${c.byteOffset}:`),s&&(h+=`${c.startLine+1}:`),Q&&(h+=`${c.column}:`),S.push(h+l);for(let a=c.startLine;a<=c.endLine;a++)b(),R.add(a),P=a}else for(let l=c.startLine;l<=c.endLine&&l<M;l++)if(b(),!R.has(l)){R.add(l),P=l;let h=_[l];N!==null&&l===c.startLine&&(n.lastIndex=0,h=n.replace(h,N));let a=u?`${u}:`:"";z&&l===c.startLine&&(a+=`${c.byteOffset}:`),s&&(a+=`${l+1}:`),Q&&l===c.startLine&&(a+=`${c.column}:`),S.push(a+h)}for(let l=c.endLine+1;l<=m;l++)if(b(),!R.has(l)){R.add(l),P=l;let h=_[l];s&&(h=`${l+1}-${h}`),u&&(h=`${u}-${h}`),S.push(h)}}return{output:S.length>0?`${S.join(`
18
+ `)}
19
+ `:"",matched:!0,matchCount:k.length}}var le=new Map([["alpha","a-zA-Z"],["digit","0-9"],["alnum","a-zA-Z0-9"],["lower","a-z"],["upper","A-Z"],["xdigit","0-9A-Fa-f"],["space"," \\t\\n\\r\\f\\v"],["blank"," \\t"],["punct","!-/:-@\\[-`{-~"],["graph","!-~"],["print"," -~"],["cntrl","\\x00-\\x1F\\x7F"],["ascii","\\x00-\\x7F"],["word","a-zA-Z0-9_"]]);function te(t){let n="",e=0;for(;e<t.length;){if(t.slice(e,e+7)==="[[:<:]]"){n+="\\b",e+=7;continue}if(t.slice(e,e+7)==="[[:>:]]"){n+="\\b",e+=7;continue}if(t[e]==="["){let i="[";for(e++,e<t.length&&(t[e]==="^"||t[e]==="!")&&(i+="^",e++),e<t.length&&t[e]==="]"&&(i+="\\]",e++);e<t.length&&t[e]!=="]";){if(t[e]==="["&&e+1<t.length&&t[e+1]===":"){let s=t.indexOf(":]",e+2);if(s!==-1){let o=t.slice(e+2,s),f=le.get(o);if(f){i+=f,e=s+2;continue}}}if(t[e]==="\\"&&e+1<t.length){i+=t[e]+t[e+1],e+=2;continue}i+=t[e],e++}e<t.length&&t[e]==="]"&&(i+="]",e++),n+=i;continue}if(t[e]==="\\"&&e+1<t.length){n+=t[e]+t[e+1],e+=2;continue}n+=t[e],e++}return n}function se(t,n){let e,i;switch(n.mode){case"fixed":e=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");break;case"extended":case"perl":{if(e=te(t),e=e.replace(/\(\?P<([^>]+)>/g,"(?<$1>"),n.mode==="perl"){e=ue(e),e=he(e),e=ae(e);let u=ge(e);e=u.pattern,i=u.kResetGroup}break}default:e=te(t),e=Ce(e);break}n.wholeWord&&(e=`\\b(?:${e})\\b`),n.lineRegexp&&(e=`^(?:${e})$`);let s=/\\u\{[0-9A-Fa-f]+\}/.test(e),o="g"+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.multilineDotall?"s":"")+(s?"u":""),f=oe(e,n.ignoreCase??!1);return{regex:Y(e,o),kResetGroup:i,preFilter:f??void 0}}function oe(t,n){let e=t;if(e.startsWith("\\b(?:")&&e.endsWith(")\\b")?e=e.slice(5,e.length-3):e.startsWith("\\b")&&e.endsWith("\\b")&&e.length>=4&&(e=e.slice(2,e.length-2)),e.length===0)return null;let i=ce(e);if(i===null)return null;let s=[];for(let o of i){let f=fe(o);if(f===null||f.length===0)return null;s.push(f)}return s.length===0?null:{needles:n?s.map(o=>o.toLowerCase()):s,ignoreCase:n}}function ce(t){let n=[],e=0,i=!1,s=0;for(let o=0;o<t.length;o++){let f=t[o];if(f==="\\"){o++;continue}if(i){f==="]"&&(i=!1);continue}if(f==="[")i=!0;else if(f==="(")e++;else if(f===")"){if(e--,e<0)return null}else f==="|"&&e===0&&(n.push(t.slice(s,o)),s=o+1)}return e!==0||i?null:(n.push(t.slice(s)),n)}function fe(t){let n=t;if(n.startsWith("^")&&(n=n.slice(1)),n.endsWith("$")){let i=0;for(let s=n.length-2;s>=0&&n[s]==="\\";s--)i++;i%2===0&&(n=n.slice(0,-1))}if(n.length===0)return null;let e="";for(let i=0;i<n.length;i++){let s=n[i];if(s==="\\"){let o=n[i+1];if(o===void 0||/[dDwWsSbBAZzGQE0-9ckpPNXRxuU]/.test(o))return null;o==="n"?e+=`
20
+ `:o==="t"?e+=" ":o==="r"?e+="\r":o==="f"?e+="\f":o==="v"?e+="\v":e+=o,i++;continue}if(/[.*+?^${}()|[\]]/.test(s))return null;e+=s}return e}function ue(t){let n="",e=0;for(;e<t.length;)if(t[e]==="\\"&&e+1<t.length&&t[e+1]==="Q"){e+=2;let i="";for(;e<t.length;){if(t[e]==="\\"&&e+1<t.length&&t[e+1]==="E"){e+=2;break}i+=t[e],e++}n+=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}else n+=t[e],e++;return n}function he(t){return t.replace(/\\x\{([0-9A-Fa-f]+)\}/g,"\\u{$1}")}function ae(t){let n="",e=0;for(;e<t.length;){if(t[e]==="("&&e+1<t.length&&t[e+1]==="?"){let i=t.slice(e).match(/^\(\?([imsx]*)(-[imsx]*)?(:|$|\))/);if(i){let s=i[1]||"",o=i[2]||"",f=i[3];if(f===":"){let u=e+i[0].length-1,p=re(t,e);if(p!==-1){let F=t.slice(u+1,p),W=de(F,s,o);n+=`(?:${W})`,e=p+1;continue}}else if(f===")"||f===""){e+=i[0].length;continue}}}n+=t[e],e++}return n}function re(t,n){let e=0,i=n;for(;i<t.length;){if(t[i]==="\\"){i+=2;continue}if(t[i]==="["){for(i++;i<t.length&&t[i]!=="]";)t[i]==="\\"&&i++,i++;i++;continue}if(t[i]==="(")e++;else if(t[i]===")"&&(e--,e===0))return i;i++}return-1}function de(t,n,e){let i=t;return n.includes("i")&&(i=me(i)),i}function me(t){let n="",e=0;for(;e<t.length;){let i=t[e];if(i==="\\"){e+1<t.length?(n+=i+t[e+1],e+=2):(n+=i,e++);continue}if(i==="["){n+=i,e++,e<t.length&&t[e]==="^"&&(n+=t[e],e++);let s=[];for(;e<t.length&&t[e]!=="]";)if(t[e]==="\\")s.push(t[e]),e++,e<t.length&&(s.push(t[e]),e++);else if(t[e]==="-"&&s.length>0&&e+1<t.length&&t[e+1]!=="]"){let o=s[s.length-1],f=t[e+1];s.push("-"),s.push(f),/[a-z]/.test(o)&&/[a-z]/.test(f)?(s.push(o.toUpperCase()),s.push("-"),s.push(f.toUpperCase())):/[A-Z]/.test(o)&&/[A-Z]/.test(f)&&(s.push(o.toLowerCase()),s.push("-"),s.push(f.toLowerCase())),e+=2}else{let o=t[e];if(s.push(o),/[a-zA-Z]/.test(o)){let f=o===o.toLowerCase()?o.toUpperCase():o.toLowerCase();s.includes(f)||s.push(f)}e++}n+=s.join(""),e<t.length&&(n+=t[e],e++);continue}if(/[a-zA-Z]/.test(i)){let s=i.toLowerCase(),o=i.toUpperCase();n+=`[${o}${s}]`}else n+=i;e++}return n}function ge(t){let n=$e(t);if(n===-1)return{pattern:t};let e=t.slice(0,n),i=t.slice(n+2),s=xe(e);return{pattern:`(?:${e})(${i})`,kResetGroup:s+1}}function $e(t){let n=0;for(;n<t.length-1;)if(t[n]==="\\"){if(t[n+1]==="K"){let e=0,i=n-1;for(;i>=0&&t[i]==="\\";)e++,i--;if(e%2===0)return n}n+=2}else n++;return-1}function xe(t){let n=0,e=0;for(;e<t.length;){if(t[e]==="\\"){e+=2;continue}if(t[e]==="["){for(e++;e<t.length&&t[e]!=="]";)t[e]==="\\"&&e++,e++;e++;continue}if(t[e]==="(")if(e+1<t.length&&t[e+1]==="?"){if(e+2<t.length){let i=t[e+2];if(i===":"||i==="="||i==="!"){e++;continue}if(i==="<"&&e+3<t.length){let s=t[e+3];if(s==="="||s==="!"){e++;continue}n++,e++;continue}}}else n++;e++}return n}function we(t){let n=t.replace(/\$\{0\}|\$0(?![0-9])/g,"$$&");return n=n.replace(/\$\{([^0-9}][^}]*)\}/g,"$$<$1>"),n=n.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)(?![>0-9])/g,"$$<$1>"),n}function Ce(t){let n="",e=0,i=!0,s=0;for(;e<t.length;){let o=t[e];if(o==="["){for(n+=o,e++,e<t.length&&(t[e]==="^"||t[e]==="!")&&(n+=t[e],e++),e<t.length&&t[e]==="]"&&(n+=t[e],e++);e<t.length&&t[e]!=="]";)t[e]==="\\"&&e+1<t.length?(n+=t[e]+t[e+1],e+=2):(n+=t[e],e++);e<t.length&&t[e]==="]"&&(n+=t[e],e++),i=!1;continue}if(o==="\\"&&e+1<t.length){let f=t[e+1];if(f==="|"){n+="|",e+=2,i=!0;continue}if(f==="("){n+="(",e+=2,s++,i=!0;continue}if(f===")"){n+=")",e+=2,s=Math.max(0,s-1),i=!1;continue}if(f==="{"){let p=t.slice(e).match(/^\\{(\d+)(,(\d*)?)?\\}/);if(p){let F=p[1],W=p[2]!==void 0,I=p[3]||"";W?n+=`{${F},${I}}`:n+=`{${F}}`,e+=p[0].length,i=!1;continue}n+="\\{",e+=2,i=!1;continue}if(f==="}"){n+="\\}",e+=2,i=!1;continue}n+=o+f,e+=2,i=!1;continue}if(o==="*"&&i){n+="\\*",e++;continue}if(o==="^"){if(i){n+="^",e++;continue}n+="\\^",e++;continue}if(o==="$"){let f=e===t.length-1,u=e+2<t.length&&t[e+1]==="\\"&&t[e+2]===")";f||u?n+="$":n+="\\$",e++,i=!1;continue}o==="+"||o==="?"||o==="|"||o==="("||o===")"||o==="{"||o==="}"?n+=`\\${o}`:n+=o,e++,i=!1}return n}export{ne as a,se as b,we as c};
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as c}from"./chunk-GFI5BHZX.js";var n=class extends Error{stdout;stderr;internalOutputAccounting={stdout:0,stderr:0};constructor(t,e="",s=""){super(t),this.stdout=e,this.stderr=s}prependOutput(t,e){this.stdout=t+this.stdout,this.stderr=e+this.stderr,this.internalOutputAccounting.stdout+=c(t),this.internalOutputAccounting.stderr+=c(e)}},u=class extends n{levels;name="BreakError";constructor(t=1,e="",s=""){super("break",e,s),this.levels=t}},i=class extends n{levels;name="ContinueError";constructor(t=1,e="",s=""){super("continue",e,s),this.levels=t}},a=class extends n{exitCode;name="ReturnError";constructor(t=0,e="",s=""){super("return",e,s),this.exitCode=t}},x=class extends n{exitCode;name="ErrexitError";constructor(t,e="",s=""){super(`errexit: command exited with status ${t}`,e,s),this.exitCode=t}},p=class extends n{varName;name="NounsetError";constructor(t,e=""){super(`${t}: unbound variable`,e,`bash: ${t}: unbound variable
4
+ `),this.varName=t}},d=class extends n{exitCode;name="ExitError";constructor(t,e="",s=""){super("exit",e,s),this.exitCode=t}},l=class extends n{name="ArithmeticError";fatal;constructor(t,e="",s="",o=!1){super(t,e,s),this.stderr=s||`bash: ${t}
5
+ `,this.fatal=o}},h=class extends n{name="BadSubstitutionError";constructor(t,e="",s=""){super(t,e,s),this.stderr=s||`bash: ${t}: bad substitution
6
+ `}},m=class extends n{name="GlobError";constructor(t,e="",s=""){super(`no match: ${t}`,e,s),this.stderr=s||`bash: no match: ${t}
7
+ `}},b=class extends n{name="BraceExpansionError";constructor(t,e="",s=""){super(t,e,s),this.stderr=s||`bash: ${t}
8
+ `}},f=class extends n{limitType;name="ExecutionLimitError";static EXIT_CODE=126;constructor(t,e,s="",o=""){super(t,s,o),this.limitType=e,this.stderr=o||`bash: ${t}
9
+ `}},$=class extends n{name="ExecutionAbortedError";constructor(t="",e=""){super("execution aborted",t,e)}},C=class extends n{name="SubshellExitError";constructor(t="",e=""){super("subshell exit",t,e)}};function E(r){return r instanceof u||r instanceof i||r instanceof a}var v=class extends n{exitCode;name="PosixFatalError";constructor(t,e="",s=""){super("posix fatal error",e,s),this.exitCode=t}};export{n as a,u as b,i as c,a as d,x as e,p as f,d as g,l as h,h as i,m as j,b as k,f as l,$ as m,C as n,E as o,v as p};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as l}from"./chunk-7DPD5PK3.js";import{a as f}from"./chunk-PBOVSFTJ.js";import{a as d}from"./chunk-NE4R2FVV.js";var p={recursive:{short:"p",long:"parents",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},b={name:"mkdir",async execute(m,t){let e=d("mkdir",m,p);if(!e.ok)return e.error;let u=e.result.flags.recursive,g=e.result.flags.verbose,n=e.result.positional;if(n.length===0)return{stdout:"",stderr:`mkdir: missing operand
4
+ `,exitCode:1};let a="",o="",c=0;for(let r of n)try{let i=t.fs.resolvePath(t.cwd,r);await t.fs.mkdir(i,{recursive:u}),g&&(a+=`mkdir: created directory '${r}'
5
+ `)}catch(i){let s=l(i);s.includes("ENOENT")||s.includes("no such file")?o+=`mkdir: cannot create directory '${r}': No such file or directory
6
+ `:s.includes("EEXIST")||s.includes("already exists")?o+=`mkdir: cannot create directory '${r}': File exists
7
+ `:o+=`mkdir: cannot create directory '${r}': ${f(s)}
8
+ `,c=1}return{stdout:a,stderr:o,exitCode:c}}},h={name:"mkdir",flags:[{flag:"-p",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{b as a,h as b};
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as u}from"./chunk-7DPD5PK3.js";import{a as p}from"./chunk-PBOVSFTJ.js";import{a as m}from"./chunk-NE4R2FVV.js";var v={recursive:{short:"r",long:"recursive",type:"boolean"},recursiveUpper:{short:"R",type:"boolean"},force:{short:"f",long:"force",type:"boolean"},verbose:{short:"v",long:"verbose",type:"boolean"}},E={name:"rm",async execute(g,s){let e=m("rm",g,v);if(!e.ok)return e.error;let i=e.result.flags.recursive||e.result.flags.recursiveUpper,a=e.result.flags.force,d=e.result.flags.verbose,c=e.result.positional;if(c.length===0)return a?{stdout:"",stderr:"",exitCode:0}:{stdout:"",stderr:`rm: missing operand
4
+ `,exitCode:1};let f="",t="",l=0;for(let r of c)try{let n=s.fs.resolvePath(s.cwd,r);if((await s.fs.stat(n)).isDirectory&&!i){t+=`rm: cannot remove '${r}': Is a directory
5
+ `,l=1;continue}await s.fs.rm(n,{recursive:i,force:a}),d&&(f+=`removed '${r}'
6
+ `)}catch(n){if(!a){let o=u(n);o.includes("ENOENT")||o.includes("no such file")?t+=`rm: cannot remove '${r}': No such file or directory
7
+ `:o.includes("ENOTEMPTY")||o.includes("not empty")?t+=`rm: cannot remove '${r}': Directory not empty
8
+ `:t+=`rm: cannot remove '${r}': ${p(o)}
9
+ `,l=1}}return{stdout:f,stderr:t,exitCode:l}}},$={name:"rm",flags:[{flag:"-r",type:"boolean"},{flag:"-R",type:"boolean"},{flag:"-f",type:"boolean"},{flag:"-v",type:"boolean"}],needsArgs:!0};export{E as a,$ as b};
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as c,b as p}from"./chunk-GFI5BHZX.js";import{a as h,b,c as w}from"./chunk-MUFNRCMY.js";var g={name:"fold",summary:"wrap each input line to fit in specified width",usage:"fold [OPTION]... [FILE]...",description:"Wrap input lines in each FILE, writing to standard output. If no FILE is specified, standard input is read.",options:["-w WIDTH Use WIDTH columns instead of 80","-s Break at spaces","-b Count bytes rather than columns"],examples:["fold -w 40 file.txt # Wrap at 40 columns","fold -sw 40 file.txt # Word wrap at 40 columns","echo 'long line' | fold -w 5 # Force wrap at 5"]};function y(s,r,n){return n?c(s):s===" "?8-r%8:s==="\b"?-1:1}function N(s,r){if(s.length===0)return s;let{width:n,breakAtSpaces:u,countBytes:i}=r,l=[],e="",t=0,o=-1,f=0;for(let a of s){let d=y(a,t,i);t+d>n&&e.length>0?u&&o>=0?(l.push(e.slice(0,o+1)),e=e.slice(o+1)+a,t=t-f-1+d,o=-1,f=0):(l.push(e),e=a,t=d,o=-1,f=0):(e+=a,t+=d,(a===" "||a===" ")&&(o=e.length-1,f=t-d))}return e.length>0&&l.push(e),l.join(`
4
+ `)}function m(s,r){if(s==="")return"";let n=s.split(`
5
+ `),u=s.endsWith(`
6
+ `)&&n[n.length-1]==="";return u&&n.pop(),n.map(l=>N(l,r)).join(`
7
+ `)+(u?`
8
+ `:"")}var x={name:"fold",execute:async(s,r)=>{if(b(s))return h(g);let n={width:80,breakAtSpaces:!1,countBytes:!1},u=[],i=0;for(;i<s.length;){let e=s[i];if(e==="-w"&&i+1<s.length){let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
9
+ `};n.width=t,i+=2}else if(e.startsWith("-w")&&e.length>2){let t=parseInt(e.slice(2),10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${e.slice(2)}'
10
+ `};n.width=t,i++}else if(e==="-s")n.breakAtSpaces=!0,i++;else if(e==="-b")n.countBytes=!0,i++;else if(e==="-bs"||e==="-sb")n.breakAtSpaces=!0,n.countBytes=!0,i++;else if(e.match(/^-[sb]+w\d+$/)){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=e.replace(/^-[sb]+w/,""),o=parseInt(t,10);if(Number.isNaN(o)||o<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${t}'
11
+ `};n.width=o,i++}else if(e.match(/^-[sb]+w$/)&&i+1<s.length){e.includes("s")&&(n.breakAtSpaces=!0),e.includes("b")&&(n.countBytes=!0);let t=parseInt(s[i+1],10);if(Number.isNaN(t)||t<1)return{exitCode:1,stdout:"",stderr:`fold: invalid number of columns: '${s[i+1]}'
12
+ `};n.width=t,i+=2}else if(e==="--"){u.push(...s.slice(i+1));break}else if(e.startsWith("-")&&e!=="-"){let t=e.slice(1),o=!1;for(let f of t)if(f==="s")n.breakAtSpaces=!0;else if(f==="b")n.countBytes=!0;else{o=!0;break}if(o)return w("fold",e);i++}else u.push(e),i++}let l="";if(u.length===0){let e=p(r.stdin)??"";l=m(e,n)}else for(let e of u){let t=r.fs.resolvePath(r.cwd,e),o=await r.fs.readFile(t);if(o===null)return{exitCode:1,stdout:l,stderr:`fold: ${e}: No such file or directory
13
+ `};l+=m(o,n)}return{exitCode:0,stdout:l,stderr:""}}},C={name:"fold",flags:[{flag:"-w",type:"value",valueHint:"number"},{flag:"-s",type:"boolean"},{flag:"-b",type:"boolean"}],stdinType:"text",needsFiles:!0};export{x as a,C as b};
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as Y,b as C,c as Z,d as ee}from"./chunk-YZQ4SVJV.js";import{d as M}from"./chunk-74MYVPDY.js";import{a as K,b as X}from"./chunk-ABM5WFEO.js";import{b as F}from"./chunk-4ARWO6Y3.js";import{a as H}from"./chunk-VGSRQOLD.js";import{l as j}from"./chunk-EPWMLTS6.js";import{a as P,b as L}from"./chunk-GFI5BHZX.js";import{a as B}from"./chunk-PBOVSFTJ.js";import{a as W,b as G,c as T}from"./chunk-MUFNRCMY.js";function se(i){switch(i){case"\b":return"\\b";case"\f":return"\\f";case`
4
+ `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return`\\u${i.charCodeAt(0).toString(16).padStart(4,"0")}`}}function ne(i){let t="",d=!1,m=!1;for(let s=0;s<i.length;s++){let a=i[s];if(m){t+=a,m=!1;continue}if(a==="\\"){t+=a,m=!0;continue}if(a==='"'){t+=a,d=!d;continue}if(d&&a.charCodeAt(0)<=31){t+=se(a);continue}t+=a}return t}function R(i,t,d){return JSON.parse(ne(i.slice(t,d)))}function J(i,t){let d=[],m=x=>{if(d.length>=t.maxElements)throw new j(`query result element limit exceeded (${t.maxElements})`,"array_elements");d.push(x)},s=0,a=i.length;for(;s<a;){for(;s<a&&/\s/.test(i[s]);)s++;if(s>=a)break;let x=s,p=i[s];if(p==="{"||p==="["){let u=[p==="{"?"}":"]"],h=!1,E=!1;for(s++;s<a&&u.length>0;){let g=i[s];if(E)E=!1;else if(g==="\\")E=!0;else if(g==='"')h=!h;else if(!h){if(g==="{"||g==="["){if(u.push(g==="{"?"}":"]"),u.length>t.maxDepth)throw new j(`query depth limit exceeded (${t.maxDepth})`,"recursion")}else if((g==="}"||g==="]")&&u.pop()!==g)throw new Error(`Mismatched JSON delimiter at position ${s}`)}s++}if(u.length!==0)throw new Error(`Unexpected end of JSON input at position ${s} (unclosed ${p})`);m(M(R(i,x,s),{maxDepth:t.maxDepth,maxElements:t.maxElements}))}else if(p==='"'){let u=!1;for(s++;s<a;){let h=i[s];if(u)u=!1;else if(h==="\\")u=!0;else if(h==='"'){s++;break}s++}m(M(R(i,x,s),t))}else if(p==="-"||p>="0"&&p<="9"){for(;s<a&&/[\d.eE+-]/.test(i[s]);)s++;m(M(R(i,x,s),t))}else if(i.slice(s,s+4)==="true")m(!0),s+=4;else if(i.slice(s,s+5)==="false")m(!1),s+=5;else if(i.slice(s,s+4)==="null")m(null),s+=4;else{let u=i.slice(s,s+10);throw new Error(`Invalid JSON at position ${x}: unexpected '${u.split(/\s/)[0]}'`)}}return d}function S(i){return{stdout:"",stderr:`jq: ${i}
5
+ `,exitCode:2}}var re={name:"jq",summary:"command-line JSON processor",usage:"jq [OPTIONS] FILTER [FILE...]",options:["-R, --raw-input read each line as string instead of JSON","-r, --raw-output output strings without quotes","-c, --compact-output compact instead of pretty-printed output","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-a, --ascii force ASCII output","-S, --sort-keys sort object keys","-C, --color colorize output (ignored)","-M, --monochrome monochrome output (ignored)"," --tab use tabs for indentation"," --arg NAME VALUE bind $NAME to the string VALUE"," --argjson NAME JSON bind $NAME to the JSON-decoded value JSON"," --rawfile NAME FILE bind $NAME to the raw contents of FILE"," --slurpfile NAME FILE bind $NAME to the array of JSON values in FILE"," --args remaining arguments are string positional args ($ARGS.positional)"," --jsonargs remaining arguments are JSON positional args ($ARGS.positional)"," --help display this help and exit"]},we={name:"jq",async execute(i,t){K(t.requireDefenseContext,"jq","execution entry");let d=(r,e)=>X(t.requireDefenseContext,"jq",r,e);if(G(i))return W(re);let m=!1,s=!1,a=!1,x=!1,p=!1,u=!1,h=!1,E=!1,g=!1,V=".",_=!1,A="none",N=[],$=new Map,k=[],q=[],v={maxDepth:t.limits.maxQueryDepth,maxElements:t.limits.maxQueryElements};for(let r=0;r<i.length;r++){let e=i[r];if(e==="-R"||e==="--raw-input")s=!0;else if(e==="-r"||e==="--raw-output")m=!0;else if(e==="-c"||e==="--compact-output")a=!0;else if(e==="-e"||e==="--exit-status")x=!0;else if(e==="-s"||e==="--slurp")p=!0;else if(e==="-n"||e==="--null-input")u=!0;else if(e==="-j"||e==="--join-output")h=!0;else if(!(e==="-a"||e==="--ascii")){if(e==="-S"||e==="--sort-keys")E=!0;else if(!(e==="-C"||e==="--color")){if(!(e==="-M"||e==="--monochrome"))if(e==="--tab")g=!0;else if(e==="--arg"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--arg takes two parameters (e.g. --arg varname value)");$.set(n,l),r+=2}else if(e==="--argjson"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--argjson takes two parameters (e.g. --argjson varname text)");let y;try{y=J(l.trim(),v)}catch{return S("invalid JSON text passed to --argjson")}if(y.length!==1)return S("invalid JSON text passed to --argjson");$.set(n,y[0]),r+=2}else if(e==="--rawfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--rawfile takes two parameters (e.g. --rawfile varname filename)");q.push({name:n,file:l,mode:"raw"}),r+=2}else if(e==="--slurpfile"){let n=i[r+1],l=i[r+2];if(n===void 0||l===void 0)return S("--slurpfile takes two parameters (e.g. --slurpfile varname filename)");q.push({name:n,file:l,mode:"slurp"}),r+=2}else if(e==="--args")A="args";else if(e==="--jsonargs")A="jsonargs";else if(e==="-")N.push("-");else{if(e.startsWith("--"))return T("jq",e);if(e.startsWith("-")){for(let n of e.slice(1))if(n==="R")s=!0;else if(n==="r")m=!0;else if(n==="c")a=!0;else if(n==="e")x=!0;else if(n==="s")p=!0;else if(n==="n")u=!0;else if(n==="j")h=!0;else if(n!=="a"){if(n==="S")E=!0;else if(n!=="C"){if(n!=="M")return T("jq",`-${n}`)}}}else if(!_)V=e,_=!0;else if(A==="args")k.push(e);else if(A==="jsonargs"){let n;try{n=J(e.trim(),v)}catch{return S("invalid JSON text passed to --jsonargs")}if(n.length!==1)return S("invalid JSON text passed to --jsonargs");k.push(n[0])}else N.push(e)}}}}if(q.length>0){let r=await d("arg file read",()=>F(t,q.map(e=>e.file),{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};for(let e=0;e<q.length;e++){let{name:n,mode:l}=q[e],y=L(r.files[e].content);if(l==="raw")$.set(n,y);else{let b=y.trim();try{$.set(n,b?J(b,v):[])}catch{return S("invalid JSON text passed to --slurpfile")}}}}let D=[];if(!u)if(N.length===0||N.length===1&&N[0]==="-")D.push({source:"stdin",content:L(t.stdin)});else{let r=await d("file read",()=>F(t,N,{cmdName:"jq",stopOnError:!0}));if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:2};D=r.files.map(e=>({source:e.filename||"stdin",content:L(e.content)}))}try{let r=Z(V,{maxDepth:t.limits.maxQueryDepth,maxTokens:t.limits.maxQueryTokens,maxSourceLength:t.limits.maxStringLength}),e=[],n={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength,maxOutputSize:t.limits.maxOutputSize,maxArrayElements:t.limits.maxQueryElements,maxDepth:t.limits.maxQueryDepth}:void 0,env:t.env,namedArgs:$,positionalArgs:k,coverage:t.coverage,requireDefenseContext:t.requireDefenseContext,budget:{operations:0,callDepth:0}},l=(o,f)=>{if(f.length>t.limits.maxQueryElements-o.length)throw new j(`query result element limit exceeded (${t.limits.maxQueryElements})`,"array_elements");for(let c of f)o.push(c)};if(u)e=C(null,r,n);else if(s&&p){let o=D.map(({content:f})=>f).join("");e=C(o,r,n)}else if(s){let o="";for(let{content:f}of D){let c=o+f,w=0,O=c.indexOf(`
6
+ `,w);for(;O!==-1;)l(e,C(c.slice(w,O),r,n)),w=O+1,O=c.indexOf(`
7
+ `,w);o=c.slice(w)}o!==""&&l(e,C(o,r,n))}else if(p){let o=[];for(let{content:f}of D){let c=f.trim();c&&l(o,J(c,v))}e=C(o,r,n)}else for(let{content:o}of D){let f=o.trim();if(!f)continue;let c=J(f,v);for(let w of c)l(e,C(w,r,n))}let y=h?"":`
8
+ `,b=Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),I=[],z=0;for(let o of e){let f=I.length>0?y.length:0,c=h?0:1,w=b-z-f-c;if(w<0)throw new j(`output size limit exceeded (${b} bytes)`,"string_length");if(Y(o,t.limits.maxQueryDepth+1)>t.limits.maxQueryDepth)throw new j(`query depth limit exceeded (${t.limits.maxQueryDepth})`,"recursion");let O=ee(o,w,{compact:a,raw:m,sortKeys:E,useTab:g,limitKind:"string_length"}),U=P(O);if(z+f+U+c>b)throw new j(`output size limit exceeded (${b} bytes)`,"string_length");z+=f+U,I.push(O)}let Q=I.join(y),te=x&&(e.length===0||e.every(o=>o==null||o===!1))?1:0;return{stdout:Q?h?Q:`${Q}
9
+ `:"",stderr:"",exitCode:te}}catch(r){if(r instanceof H)throw r;if(r instanceof j)return{stdout:"",stderr:`jq: ${B(r.message)}
10
+ `,exitCode:j.EXIT_CODE};let e=B(r.message);return e.includes("Unknown function")?{stdout:"",stderr:`jq: error: ${e}
11
+ `,exitCode:3}:{stdout:"",stderr:`jq: parse error: ${e}
12
+ `,exitCode:5}}}},ye={name:"jq",flags:[{flag:"-R",type:"boolean"},{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-n",type:"boolean"},{flag:"-j",type:"boolean"},{flag:"-S",type:"boolean"},{flag:"--tab",type:"boolean"}],stdinType:"json",needsArgs:!0};export{we as a,ye as b};
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{c as u,d as l}from"./chunk-QIDBJNMB.js";import{a as r}from"./chunk-GFI5BHZX.js";import{a as p,c as o}from"./chunk-MUFNRCMY.js";var y={name:"yes",summary:"output a string repeatedly",usage:"yes [STRING]...",description:["Repeatedly output a line with all specified STRING(s), or 'y'."],options:[" --help display this help and exit"],notes:["Real yes writes until its reader goes away. Pipelines here are not","streaming \u2014 a stage runs to completion before the next one starts \u2014 so","yes stops on its own after executionLimits.maxLoopIterations lines, or","earlier if the repeated line would exceed the output size limit.","`yes | head -3` therefore behaves as expected; an unbounded consumer","sees a finite stream."]},x={name:"yes",async execute(m,s){let t=[],i=!1;for(let e of m){if(i){t.push(e);continue}if(e==="--"){i=!0;continue}if(e==="--help")return p(y);if(e.startsWith("--"))return o("yes",e);if(e.startsWith("-")&&e!=="-")return o("yes",`-${e[1]}`);t.push(e)}let n=Math.min(s.limits.maxStringLength,s.limits.maxOutputSize),a=t.length>0?`${l(t," ",n,"yes")}
4
+ `:`y
5
+ `,d=Math.floor(n/r(a)),h=Math.min(s.limits.maxLoopIterations,Math.max(1,d));return{stdout:u(a,h,n,"yes"),stderr:"",exitCode:0}}},w={name:"yes",flags:[]};export{x as a,w as b};
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as L}from"./chunk-4ARWO6Y3.js";import{a as $}from"./chunk-H22PAKR6.js";import{l as p}from"./chunk-EPWMLTS6.js";import{e as k}from"./chunk-GFI5BHZX.js";import{a as x}from"./chunk-NE4R2FVV.js";import{a as F,b as q}from"./chunk-MUFNRCMY.js";var B={name:"cat",summary:"concatenate files and print on the standard output",usage:"cat [OPTION]... [FILE]...",options:["-A, --show-all equivalent to -vET","-b, --number-nonblank number nonempty output lines, overrides -n","-e equivalent to -vE","-E, --show-ends display $ at end of each line","-n, --number number all output lines","-s, --squeeze-blank suppress repeated empty output lines","-t equivalent to -vT","-T, --show-tabs display TAB characters as ^I","-u (ignored)","-v, --show-nonprinting use ^ and M- notation, except for LFD and TAB"," --help display this help and exit"]},I={number:{short:"n",long:"number",type:"boolean"},numberNonblank:{short:"b",long:"number-nonblank",type:"boolean"},showEnds:{short:"E",long:"show-ends",type:"boolean"},showTabs:{short:"T",long:"show-tabs",type:"boolean"},showNonprinting:{short:"v",long:"show-nonprinting",type:"boolean"},showAll:{short:"A",long:"show-all",type:"boolean"},squeeze:{short:"s",long:"squeeze-blank",type:"boolean"},vE:{short:"e",type:"boolean"},vT:{short:"t",type:"boolean"},ignored:{short:"u",type:"boolean"}},K={name:"cat",async execute(n,t){if(q(n))return F(B);let r=x("cat",n,I);if(!r.ok)return r.error;let e=r.result.flags,a=e.showEnds||e.showAll||e.vE,o=e.showTabs||e.showAll||e.vT,i=e.showNonprinting||e.showAll||e.vE||e.vT,c=e.squeeze,l=e.numberNonblank,f=e.number&&!l,s={numberAll:f,numberNonblank:l,showEnds:a,showTabs:o,showNonprinting:i,squeeze:c},m=r.result.positional,b=t.limits.maxStringLength,u=Math.min(b,t.limits.maxOutputSize),g=m.length===0?["-"]:m,h="",d=0,C=0,E,w=a||o||i||c||f||l,v="";for(let y of g)try{let T=y==="-"?t.stdin:await k(t.fs,t.fs.resolvePath(t.cwd,y)),A=T,z=A.length,N=Math.min(w?b:u,t.limits.maxInputBytes);if(z>N-C)throw new p(`cat: ${w?"input":"output"} size limit exceeded (${N} bytes)`,w?"string_length":"output_size");y!=="-"&&L(t,z,"cat"),C+=z,v+=A}catch(T){$(T),h+=`cat: ${y}: No such file or directory
4
+ `,d=1}return w?E=_(v,s,u,t.limits.maxArrayElements):E=v,{stdout:E,stderr:h,exitCode:d,stdoutEncoding:"binary"}}};function S(n){if(n>=32){if(n<127)return String.fromCharCode(n);if(n===127)return"^?";let t=n-128;return t>=32?t===127?"M-^?":`M-${String.fromCharCode(t)}`:`M-^${String.fromCharCode(t+64)}`}return`^${String.fromCharCode(n+64)}`}function M(n,t,r){if(!t.showNonprinting&&!t.showTabs)return n;let e="",a=o=>{if(o.length>r-e.length)throw new p("cat: output size limit exceeded","output_size");e+=o};for(let o=0;o<n.length;o++){let i=n.charCodeAt(o);i===9?a(t.showTabs?"^I":" "):t.showNonprinting?a(S(i)):a(n[o])}return e}function _(n,t,r,e){let a=1;for(let s=0;s<n.length;s++)if(n.charCodeAt(s)===10&&a++,a>e)throw new p(`cat: array element limit exceeded (${e})`,"array_elements");let o=n.split(`
5
+ `),i="",c=1,l=!1,f=s=>{if(s.length>r-i.length)throw new p(`cat: output size limit exceeded (${r} bytes)`,"output_size");i+=s};for(let s=0;s<o.length;s++){let m=s===o.length-1,b=!m,u=o[s];if(m&&u==="")break;let g=u==="";if(t.squeeze&&g&&l)continue;l=g;let h="";(t.numberAll||t.numberNonblank&&!g)&&(h=`${String(c).padStart(6," ")} `,c++);let d=r-i.length-h.length;if(d<0)throw new p(`cat: output size limit exceeded (${r} bytes)`,"output_size");f(h+M(u,t,d)),b&&f(t.showEnds?`$
6
+ `:`
7
+ `)}return i}var Q={name:"cat",flags:[{flag:"-n",type:"boolean"},{flag:"-A",type:"boolean"},{flag:"-b",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-v",type:"boolean"},{flag:"-e",type:"boolean"},{flag:"-t",type:"boolean"}],stdinType:"text",needsFiles:!0};export{K as a,Q as b};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ var h=new TextDecoder("utf-8",{fatal:!0}),x=new TextEncoder,i=512*1024*1024;function u(t,n,e){if(!Number.isSafeInteger(t)||t<0||!Number.isSafeInteger(n)||n<0||t>n)throw new RangeError(`${e}: byte conversion limit exceeded (${n} bytes)`)}function g(t){if(typeof Buffer<"u")return Buffer.byteLength(t,"utf8");let n=0;for(let e=0;e<t.length;e++){let o=t.charCodeAt(e);if(o<=127)n++;else if(o<=2047)n+=2;else if(o>=55296&&o<=56319&&e+1<t.length){let f=t.charCodeAt(e+1);f>=56320&&f<=57343?(n+=4,e++):n+=3}else n+=3}return n}function l(t,n=i){let e=t;if(!e)return e;u(e.length,n,"UTF-8 decode");let o=!1;for(let r=0;r<e.length;r++){let d=e.charCodeAt(r);if(d>255)return e;d>127&&(o=!0)}if(!o)return e;let f=new Uint8Array(e.length);for(let r=0;r<e.length;r++)f[r]=e.charCodeAt(r);try{return h.decode(f)}catch{return e}}function a(t,n=i){if(!t)return t;let e=g(t);return u(e,n,"UTF-8 encode"),e===t.length?t:s(x.encode(t))}var B="",c=8192;function s(t){if(typeof Buffer<"u")return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("latin1");let n=[],e=[];for(let o=0;o<t.length;o+=c){let f=Math.min(c,t.length-o);e.length=f;for(let r=0;r<f;r++)e[r]=t[o+r];n.push(String.fromCharCode.apply(null,e))}return n.join("")}function p(t,n=i){return u(t.byteLength,n,"byte-string conversion"),s(t)}async function b(t,n){return typeof t.readFileBytes=="function"?t.readFileBytes(n):p(await t.readFileBuffer(n))}function y(t){return t.stdoutKind?t.stdoutKind:t.stdoutEncoding==="binary"?"bytes":"text"}function T(t){return y(t)==="bytes"?t.stdout:a(t.stdout)}function E(t){return y(t)==="bytes"?l(t.stdout):t.stdout}export{g as a,l as b,a as c,B as d,b as e,T as f,E as g};
@@ -0,0 +1,143 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
3
+ import{a as $,b as F,c as b,d as j,e as Ze,f as et,g as C,h as tt,i as nt,j as k,k as ie,l as ae}from"./chunk-U7VJCJQR.js";import{b as V,d as Qe}from"./chunk-YZQ4SVJV.js";import{d as Ge,f as Xe,g as oe}from"./chunk-74MYVPDY.js";import{a as Z}from"./chunk-26O2G5LX.js";import{b as Ye}from"./chunk-4ARWO6Y3.js";import{a as q}from"./chunk-H22PAKR6.js";import{a as W,d as se,e as re}from"./chunk-QIDBJNMB.js";import{l as E}from"./chunk-EPWMLTS6.js";import{a as K,b as Y}from"./chunk-GFI5BHZX.js";import{a as J,b as ne}from"./chunk-MUFNRCMY.js";var G=class{input;pos=0;tokens=[];maxSourceLength;maxTokens;constructor(t,n={}){this.input=t,this.maxSourceLength=n.maxSourceLength??1024*1024,this.maxTokens=n.maxTokens??1e5}tokenize(){if(this.input.length>this.maxSourceLength)throw new E(`xan: expression length limit exceeded (${this.maxSourceLength})`,"string_length");for(;this.pos<this.input.length&&(this.skipWhitespace(),!(this.pos>=this.input.length));){let t=this.nextToken();t&&(this.assertTokenCapacity(),this.tokens.push(t))}return this.assertTokenCapacity(),this.tokens.push({type:"eof",value:"",pos:this.pos}),this.tokens}assertTokenCapacity(){if(this.tokens.length>=this.maxTokens)throw new E(`xan: expression token limit exceeded (${this.maxTokens})`,"array_elements")}skipWhitespace(){for(;this.pos<this.input.length;){let t=this.input[this.pos];if(t===" "||t===" "||t===`
4
+ `||t==="\r")this.pos++;else if(t==="#")for(;this.pos<this.input.length&&this.input[this.pos]!==`
5
+ `;)this.pos++;else break}}nextToken(){let t=this.pos,n=this.input[this.pos];if(n>="0"&&n<="9")return this.readNumber();if(n==='"'||n==="'"||n==="`")return this.readString(n);if(n==="b"&&this.pos+1<this.input.length){let o=this.input[this.pos+1];if(o==='"'||o==="'"||o==="`")return this.pos++,this.readString(o)}if(n==="/"){let o=this.tokens[this.tokens.length-1];return o&&(o.type==="int"||o.type==="float"||o.type==="string"||o.type==="ident"||o.type===")"||o.type==="]")?this.input[this.pos+1]==="/"?(this.pos+=2,{type:"//",value:"//",pos:t}):(this.pos++,{type:"/",value:"/",pos:t}):this.readRegex()}if(this.match("not in"))return{type:"not in",value:"not in",pos:t};if(this.match("=>"))return{type:"=>",value:"=>",pos:t};if(this.match("**"))return{type:"**",value:"**",pos:t};if(this.match("++"))return{type:"++",value:"++",pos:t};if(this.match("//"))return{type:"//",value:"//",pos:t};if(this.match("=="))return{type:"==",value:"==",pos:t};if(this.match("!="))return{type:"!=",value:"!=",pos:t};if(this.match("<="))return{type:"<=",value:"<=",pos:t};if(this.match(">="))return{type:">=",value:">=",pos:t};if(this.match("&&"))return{type:"&&",value:"&&",pos:t};if(this.match("||"))return{type:"||",value:"||",pos:t};let r=new Map([["(","("],[")",")"],["[","["],["]","]"],["{","{"],["}","}"],[",",","],[":",":"],[";",";"],["+","+"],["-","-"],["*","*"],["%","%"],["<","<"],[">",">"],["!","!"],[".","."],["|","|"],["=","="]]).get(n);if(r!==void 0)return this.pos++,{type:r,value:n,pos:t};if(this.isIdentStart(n))return this.readIdentifier();throw new Error(`Unexpected character '${n}' at position ${this.pos}`)}match(t){if(this.input.slice(this.pos,this.pos+t.length)===t){if(/^[a-zA-Z]/.test(t)){let n=this.input[this.pos+t.length];if(n&&this.isIdentChar(n))return!1}return this.pos+=t.length,!0}return!1}isIdentStart(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="_"}isIdentChar(t){return this.isIdentStart(t)||t>="0"&&t<="9"}readNumber(){let t=this.pos,n=!1,s=!1;for(;this.pos<this.input.length;){let o=this.input[this.pos];if(o>="0"&&o<="9")this.pos++;else if(o==="_")this.pos++;else if(o==="."&&!n&&!s)n=!0,this.pos++;else if((o==="e"||o==="E")&&!s)s=!0,n=!0,this.pos++,this.pos<this.input.length&&(this.input[this.pos]==="+"||this.input[this.pos]==="-")&&this.pos++;else break}let r=this.input.slice(t,this.pos).replace(/_/g,"");return{type:n?"float":"int",value:r,pos:t}}readString(t){let n=this.pos;this.pos++;let s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r===t)return this.pos++,{type:"string",value:s,pos:n};if(r==="\\"){if(this.pos++,this.pos<this.input.length){let o=this.input[this.pos];switch(o){case"n":s+=`
6
+ `;break;case"r":s+="\r";break;case"t":s+=" ";break;case"\\":s+="\\";break;case'"':s+='"';break;case"'":s+="'";break;case"`":s+="`";break;case"0":s+="\0";break;default:s+=o}this.pos++}}else s+=r,this.pos++}throw new Error(`Unterminated string starting at position ${n}`)}readRegex(){let t=this.pos;this.pos++;let n="",s="";for(;this.pos<this.input.length;){let r=this.input[this.pos];if(r==="/"){for(this.pos++;this.pos<this.input.length&&this.input[this.pos]==="i";)s+=this.input[this.pos],this.pos++;return{type:"regex",value:n+(s?`/${s}`:""),pos:t}}r==="\\"?(n+=r,this.pos++,this.pos<this.input.length&&(n+=this.input[this.pos],this.pos++)):(n+=r,this.pos++)}throw new Error(`Unterminated regex starting at position ${t}`)}readIdentifier(){let t=this.pos;for(;this.pos<this.input.length&&this.isIdentChar(this.input[this.pos]);)this.pos++;let n=!1;this.pos<this.input.length&&this.input[this.pos]==="?"&&(n=!0,this.pos++);let s=this.input.slice(t,n?this.pos-1:this.pos);n&&(s+="?");let r=new Map([["true","true"],["false","false"],["null","null"],["and","and"],["or","or"],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["in","in"],["as","as"],["_","_"]]),o=s.replace(/\?$/,""),i=r.get(o);return i!==void 0&&!n?{type:i,value:o,pos:t}:{type:"ident",value:s,pos:t}}};function z(e){return{maxSourceLength:e.limits.maxStringLength,maxTokens:e.limits.maxQueryTokens,maxAstNodes:e.limits.maxQueryElements,maxOperations:e.limits.maxJqIterations,maxDepth:e.limits.maxQueryDepth}}var D={PIPE:1,OR:2,AND:3,EQUALITY:4,COMPARISON:5,ADDITIVE:6,MULTIPLICATIVE:7,POWER:8,UNARY:9,POSTFIX:10},ee=class{pos=0;tokens;depth=0;operations=0;astNodes=0;limits;constructor(t,n={}){this.tokens=t,this.limits={maxSourceLength:n.maxSourceLength??1024*1024,maxTokens:n.maxTokens??1e5,maxDepth:n.maxDepth??100,maxOperations:n.maxOperations??1e5,maxAstNodes:n.maxAstNodes??1e5};let s=0;for(let r of t)this.useOperation(),r.type==="("||r.type==="["||r.type==="{"?(s++,s>this.limits.maxDepth&&this.throwDepthLimit()):(r.type===")"||r.type==="]"||r.type==="}")&&(s=Math.max(0,s-1))}parse(){let t=this.parseExpr(0);if(this.peek().type!=="eof")throw new Error(`Unexpected token: ${this.peek().value}`);return t}parseExpr(t){return this.withDepth(()=>this.parseExprInner(t))}parseExprInner(t){let n=this.parsePrefix();for(;;){let s=this.peek(),r=this.getInfixPrec(s.type);if(r<t)break;n=this.parseInfix(n,r)}return n}useOperation(t=1){if(t>this.limits.maxOperations-this.operations)throw new E(`xan: expression parser operation limit exceeded (${this.limits.maxOperations})`,"iterations");this.operations+=t}withDepth(t){this.depth>=this.limits.maxDepth&&this.throwDepthLimit(),this.depth++;try{return t()}finally{this.depth--}}throwDepthLimit(){throw new E(`xan: expression parser depth limit exceeded (${this.limits.maxDepth})`,"recursion")}addAstNode(){if(this.astNodes>=this.limits.maxAstNodes)throw new E(`xan: expression AST node limit exceeded (${this.limits.maxAstNodes})`,"array_elements");this.astNodes++}parsePrefix(){let t=this.peek();switch(t.type){case"int":return this.advance(),{type:"int",value:Number.parseInt(t.value,10)};case"float":return this.advance(),{type:"float",value:Number.parseFloat(t.value)};case"string":return this.advance(),{type:"string",value:t.value};case"regex":{this.advance();let n=t.value.split("/"),s=n.length>1?n[n.length-1]:"";return{type:"regex",pattern:n.slice(0,-1).join("/")||t.value,caseInsensitive:s.includes("i")}}case"true":return this.advance(),{type:"bool",value:!0};case"false":return this.advance(),{type:"bool",value:!1};case"null":return this.advance(),{type:"null"};case"_":return this.advance(),{type:"underscore"};case"ident":{let n=t.value,s=n.endsWith("?"),r=s?n.slice(0,-1):n;if(this.advance(),this.peek().type==="(")return this.parseFunctionCall(r);if(this.peek().type==="=>"){this.advance();let o=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:[r],body:o},[r])}return{type:"identifier",name:r,unsure:s}}case"(":{this.advance();let n=this.pos;if(this.peek().type===")"){if(this.advance(),this.peek().type==="=>"){this.advance();let r=this.parseExpr(0);return{type:"lambda",params:[],body:r}}throw new Error("Empty parentheses not allowed")}if(this.peek().type==="ident"){let r=[this.peek().value];this.advance();let o=!0;for(;this.peek().type===",";)if(this.advance(),this.peek().type==="ident")r.push(this.peek().value),this.advance();else{o=!1;break}if(o&&this.peek().type===")"&&this.peekAt(1).type==="=>"){this.advance(),this.advance();let i=this.parseExpr(0);return this.bindLambdaArgs({type:"lambda",params:r,body:i},r)}this.pos=n}let s=this.parseExpr(0);return this.expect(")"),s}case"[":return this.parseList();case"{":return this.parseMap();case"-":{this.advance();let n=this.parseExpr(D.UNARY);return n.type==="int"?{type:"int",value:-n.value}:n.type==="float"?{type:"float",value:-n.value}:{type:"func",name:"neg",args:[{expr:n}]}}case"!":return this.advance(),{type:"func",name:"not",args:[{expr:this.parseExpr(D.UNARY)}]};default:throw new Error(`Unexpected token: ${t.type} (${t.value})`)}}parseFunctionCall(t){this.expect("(");let n=[];if(this.peek().type!==")")do{n.length>0&&this.peek().type===","&&this.advance();let s;if(this.peek().type==="ident"){let o=this.peek().value,i=this.pos+1;i<this.tokens.length&&this.tokens[i].type==="="&&(s=o,this.advance(),this.advance())}let r=this.parseExpr(0);n.push({name:s,expr:r})}while(this.peek().type===",");return this.expect(")"),{type:"func",name:t.toLowerCase(),args:n}}parseList(){this.expect("[");let t=[];if(this.peek().type!=="]")do t.length>0&&this.peek().type===","&&this.advance(),t.push(this.parseExpr(0));while(this.peek().type===",");return this.expect("]"),{type:"list",elements:t}}parseMap(){this.expect("{");let t=[];if(this.peek().type!=="}")do{t.length>0&&this.peek().type===","&&this.advance();let n;if(this.peek().type==="ident")n=this.peek().value,this.advance();else if(this.peek().type==="string")n=this.peek().value,this.advance();else throw new Error(`Expected map key, got ${this.peek().type}`);this.expect(":");let s=this.parseExpr(0);t.push({key:n,value:s})}while(this.peek().type===",");return this.expect("}"),{type:"map",entries:t}}parseInfix(t,n){let s=this.peek(),o=new Map([["+","add"],["-","sub"],["*","mul"],["/","div"],["//","idiv"],["%","mod"],["**","pow"],["++","concat"],["==","=="],["!=","!="],["<","<"],["<=","<="],[">",">"],[">=",">="],["eq","eq"],["ne","ne"],["lt","lt"],["le","le"],["gt","gt"],["ge","ge"],["&&","and"],["and","and"],["||","or"],["or","or"]]).get(s.type);if(o!==void 0){this.advance();let i=this.parseExpr(n+(this.isRightAssoc(s.type)?0:1));return{type:"func",name:o,args:[{expr:t},{expr:i}]}}if(s.type==="|"){this.advance();let i=this.parseExpr(n);return this.handlePipe(t,i)}if(s.type===".")return this.advance(),this.handleDot(t);if(s.type==="[")return this.advance(),this.handleIndexing(t);if(s.type==="in")return this.advance(),{type:"func",name:"contains",args:[{expr:this.parseExpr(n+1)},{expr:t}]};if(s.type==="not in")return this.advance(),{type:"func",name:"not",args:[{expr:{type:"func",name:"contains",args:[{expr:this.parseExpr(n+1)},{expr:t}]}}]};throw new Error(`Unexpected infix token: ${s.type}`)}handlePipe(t,n){if(n.type==="identifier")return{type:"func",name:n.name,args:[{expr:t}]};if(n.type==="func"){let s=this.countUnderscores(n);return s===0?n:s===1?this.fillUnderscore(n,t):{type:"pipeline",exprs:[t,n]}}return this.countUnderscores(n)===1?this.fillUnderscore(n,t):n}handleDot(t){let n=this.peek();if(n.type==="ident"){let s=n.value;if(this.advance(),this.peek().type==="("){let r=this.parseFunctionCall(s);return r.type==="func"&&r.args.unshift({expr:t}),r}return{type:"func",name:"get",args:[{expr:t},{expr:{type:"string",value:s}}]}}if(n.type==="int"){let s=Number.parseInt(n.value,10);return this.advance(),{type:"func",name:"get",args:[{expr:t},{expr:{type:"int",value:s}}]}}if(n.type==="string"){let s=n.value;return this.advance(),{type:"func",name:"get",args:[{expr:t},{expr:{type:"string",value:s}}]}}throw new Error(`Expected identifier, number, or string after dot, got ${n.type}`)}handleIndexing(t){if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:t}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:t},{expr:{type:"int",value:0}},{expr:s}]}}let n=this.parseExpr(0);if(this.peek().type===":"){if(this.advance(),this.peek().type==="]")return this.advance(),{type:"func",name:"slice",args:[{expr:t},{expr:n}]};let s=this.parseExpr(0);return this.expect("]"),{type:"func",name:"slice",args:[{expr:t},{expr:n},{expr:s}]}}return this.expect("]"),{type:"func",name:"get",args:[{expr:t},{expr:n}]}}countUnderscores(t){let n=[t],s=0;for(;n.length>0;){this.useOperation();let r=n.pop();if(!r)break;if(r.type==="underscore")s++;else if(r.type==="func")for(let o of r.args)n.push(o.expr);else if(r.type==="list")n.push(...r.elements);else if(r.type==="map")for(let o of r.entries)n.push(o.value);if(n.length>this.limits.maxAstNodes)throw new E(`xan: expression AST node limit exceeded (${this.limits.maxAstNodes})`,"array_elements")}return s}fillUnderscore(t,n){return this.withDepth(()=>this.fillUnderscoreInner(t,n))}fillUnderscoreInner(t,n){return this.useOperation(),t.type==="underscore"?n:t.type==="func"?{...t,args:t.args.map(s=>({...s,expr:this.fillUnderscore(s.expr,n)}))}:t.type==="list"?{...t,elements:t.elements.map(s=>this.fillUnderscore(s,n))}:t.type==="map"?{...t,entries:t.entries.map(s=>({...s,value:this.fillUnderscore(s.value,n)}))}:t}bindLambdaArgs(t,n){return{...t,body:this.bindLambdaArgsInExpr(t.body,n)}}bindLambdaArgsInExpr(t,n){return this.withDepth(()=>this.bindLambdaArgsInExprInner(t,n))}bindLambdaArgsInExprInner(t,n){return this.useOperation(),t.type==="identifier"&&n.includes(t.name)?{type:"lambdaBinding",name:t.name}:t.type==="func"?{...t,args:t.args.map(s=>({...s,expr:this.bindLambdaArgsInExpr(s.expr,n)}))}:t.type==="list"?{...t,elements:t.elements.map(s=>this.bindLambdaArgsInExpr(s,n))}:t.type==="map"?{...t,entries:t.entries.map(s=>({...s,value:this.bindLambdaArgsInExpr(s.value,n)}))}:t}getInfixPrec(t){switch(t){case"|":return D.PIPE;case"||":case"or":return D.OR;case"&&":case"and":return D.AND;case"==":case"!=":case"eq":case"ne":return D.EQUALITY;case"<":case"<=":case">":case">=":case"lt":case"le":case"gt":case"ge":case"in":case"not in":return D.COMPARISON;case"+":case"-":case"++":return D.ADDITIVE;case"*":case"/":case"//":case"%":return D.MULTIPLICATIVE;case"**":return D.POWER;case".":case"[":return D.POSTFIX;default:return-1}}isRightAssoc(t){return t==="**"}peek(){return this.tokens[this.pos]||{type:"eof",value:"",pos:0}}peekAt(t){return this.tokens[this.pos+t]||{type:"eof",value:"",pos:0}}advance(){return this.useOperation(),this.addAstNode(),this.tokens[this.pos++]}expect(t){let n=this.peek();if(n.type!==t)throw new Error(`Expected ${t}, got ${n.type}`);return this.advance()}};function X(e,t={}){let n=[],r=new G(e,{maxSourceLength:t.maxSourceLength,maxTokens:t.maxTokens}).tokenize(),o=0,i=()=>r[o]||{type:"eof",value:"",pos:0},p=()=>r[o++];for(;i().type!=="eof";){if(i().type===","&&n.length>0){p();continue}let h=[],m=0,c=o;for(;i().type!=="eof";){let l=i();if((l.type===","||l.type==="as")&&m===0)break;(l.type==="("||l.type==="["||l.type==="{")&&m++,(l.type===")"||l.type==="]"||l.type==="}")&&m--,h.push(p())}h.push({type:"eof",value:"",pos:0});let d=new ee(h,t).parse(),u;if(i().type==="as")if(p(),i().type==="("){p();let l=[];for(;i().type!==")"&&i().type!=="eof";)if((i().type==="ident"||i().type==="string")&&(l.push(i().value),p()),i().type===",")p();else if(i().type!==")"&&i().type!=="eof")throw new Error(`Expected tuple alias, got ${i().type}`);if(i().type!==")")throw new Error("Expected ')' after tuple alias");p(),u=l}else if(i().type==="ident"||i().type==="string")u=i().value,p();else throw new Error(`Expected name after 'as', got ${i().type}`);else u=e.slice(r[c].pos,r[o-1]?.pos||e.length).trim(),d.type==="identifier"&&(u=d.name);n.push({expr:d,name:u})}return n}function B(e,t={}){let s=new G(e,{maxSourceLength:t.maxSourceLength,maxTokens:t.maxTokens}).tokenize();return new ee(s,t).parse()}function R(e,t){return t.length===0?O(e,[]):t.length===1?{type:"Pipe",left:t[0],right:O(e,[])}:{type:"Pipe",left:t[0],right:O(e,t.slice(1))}}var le={add:e=>L("+",e[0],e[1]),sub:e=>L("-",e[0],e[1]),mul:e=>L("*",e[0],e[1]),div:e=>L("/",e[0],e[1]),mod:e=>L("%",e[0],e[1]),idiv:e=>O("floor",[L("/",e[0],e[1])]),pow:e=>R("pow",e),neg:e=>({type:"UnaryOp",op:"-",operand:e[0]}),"==":e=>L("==",e[0],e[1]),"!=":e=>L("!=",e[0],e[1]),"<":e=>L("<",e[0],e[1]),"<=":e=>L("<=",e[0],e[1]),">":e=>L(">",e[0],e[1]),">=":e=>L(">=",e[0],e[1]),eq:e=>L("==",M(e[0]),M(e[1])),ne:e=>L("!=",M(e[0]),M(e[1])),lt:e=>L("<",M(e[0]),M(e[1])),le:e=>L("<=",M(e[0]),M(e[1])),gt:e=>L(">",M(e[0]),M(e[1])),ge:e=>L(">=",M(e[0]),M(e[1])),and:e=>L("and",e[0],e[1]),or:e=>L("or",e[0],e[1]),not:e=>({type:"UnaryOp",op:"not",operand:e[0]}),len:e=>R("length",e),length:e=>R("length",e),upper:e=>R("ascii_upcase",e),lower:e=>R("ascii_downcase",e),trim:e=>R("trim",e),ltrim:e=>e.length===0?O("ltrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:O("ltrimstr",[{type:"Literal",value:" "}])},rtrim:e=>e.length===0?O("rtrimstr",[{type:"Literal",value:" "}]):{type:"Pipe",left:e[0],right:O("rtrimstr",[{type:"Literal",value:" "}])},split:e=>R("split",e),join:e=>e.length===1?O("join",[{type:"Literal",value:""}]):R("join",e),concat:e=>L("+",e[0],e[1]),startswith:e=>R("startswith",e),endswith:e=>R("endswith",e),contains:e=>R("contains",e),replace:e=>R("gsub",e),substr:e=>e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:L("+",e[1],e[2])},abs:e=>R("fabs",e),floor:e=>R("floor",e),ceil:e=>R("ceil",e),round:e=>R("round",e),sqrt:e=>R("sqrt",e),log:e=>R("log",e),log10:e=>R("log10",e),log2:e=>R("log2",e),exp:e=>R("exp",e),sin:e=>R("sin",e),cos:e=>R("cos",e),tan:e=>R("tan",e),asin:e=>R("asin",e),acos:e=>R("acos",e),atan:e=>R("atan",e),min:e=>R("min",e),max:e=>R("max",e),first:e=>e.length===0?{type:"Index",index:{type:"Literal",value:0}}:{type:"Index",index:{type:"Literal",value:0},base:e[0]},last:e=>e.length===0?{type:"Index",index:{type:"Literal",value:-1}}:{type:"Index",index:{type:"Literal",value:-1},base:e[0]},get:e=>e.length===1?{type:"Index",index:e[0]}:{type:"Index",index:e[1],base:e[0]},slice:e=>e.length===1?{type:"Slice",base:e[0]}:e.length===2?{type:"Slice",base:e[0],start:e[1]}:{type:"Slice",base:e[0],start:e[1],end:e[2]},keys:"keys",values:"values",entries:e=>O("to_entries",e),from_entries:"from_entries",reverse:"reverse",sort:"sort",sort_by:"sort_by",group_by:"group_by",unique:"unique",unique_by:"unique_by",flatten:"flatten",map:e=>({type:"Pipe",left:e[0],right:{type:"Array",elements:e[1]}}),select:e=>O("select",e),empty:()=>O("empty",[]),count:()=>O("length",[]),sum:e=>e.length===0?O("add",[]):{type:"Pipe",left:{type:"Array",elements:e[0]},right:O("add",[])},mean:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:L("/",O("add",[]),O("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:L("/",O("add",[]),O("length",[]))},avg:e=>e.length===0?{type:"Pipe",left:{type:"Identity"},right:L("/",O("add",[]),O("length",[]))}:{type:"Pipe",left:{type:"Array",elements:e[0]},right:L("/",O("add",[]),O("length",[]))},type:"type",isnull:e=>e.length===0?L("==",{type:"Identity"},{type:"Literal",value:null}):L("==",e[0],{type:"Literal",value:null}),isempty:e=>e.length===0?L("==",{type:"Identity"},{type:"Literal",value:""}):L("==",e[0],{type:"Literal",value:""}),tonumber:e=>e.length===0?O("tonumber",[]):O("tonumber",e),tostring:e=>e.length===0?O("tostring",[]):O("tostring",e),if:e=>st(e[0],e[1],e[2]),coalesce:e=>{if(e.length===0)return{type:"Literal",value:null};if(e.length===1)return e[0];let t=e[e.length-1];for(let n=e.length-2;n>=0;n--){let s=e[n],r=L("and",L("!=",s,{type:"Literal",value:null}),L("!=",s,{type:"Literal",value:""}));t=st(r,s,t)}return t},index:()=>({type:"Field",name:"_row_index"}),now:()=>O("now",[]),fmt:e=>O("tostring",e),format:e=>O("tostring",e)};Object.setPrototypeOf(le,null);function L(e,t,n){return{type:"BinaryOp",op:e,left:t,right:n}}function O(e,t){return{type:"Call",name:e,args:t}}var mt="then";function st(e,t,n){let s=Xe({type:"Cond",cond:e,elifs:[],else:n||{type:"Literal",value:null}});return s[mt]=t,s}function M(e){return{type:"Pipe",left:e,right:{type:"Call",name:"tostring",args:[]}}}function U(e,t=!0,n={}){let s={nodes:0,operations:0,maxNodes:n.maxAstNodes??1e5,maxOperations:n.maxOperations??1e5,maxDepth:n.maxDepth??100};return rt(e,t,s,0)}function rt(e,t,n,s){if(s>=n.maxDepth)throw new E(`xan: expression conversion depth limit exceeded (${n.maxDepth})`,"recursion");if(++n.nodes>n.maxNodes)throw new E(`xan: expression conversion AST limit exceeded (${n.maxNodes})`,"array_elements");if(++n.operations>n.maxOperations)throw new E(`xan: expression conversion operation limit exceeded (${n.maxOperations})`,"iterations");let r=o=>rt(o,t,n,s+1);switch(e.type){case"int":case"float":return{type:"Literal",value:e.value};case"string":return{type:"Literal",value:e.value};case"bool":return{type:"Literal",value:e.value};case"null":return{type:"Literal",value:null};case"underscore":return{type:"Index",base:{type:"Identity"},index:{type:"Literal",value:"_"}};case"identifier":return t?{type:"Field",name:e.name}:{type:"VarRef",name:e.name};case"lambdaBinding":return{type:"VarRef",name:e.name};case"func":{if(e.args.length>n.maxNodes-n.nodes)throw new E(`xan: expression conversion AST limit exceeded (${n.maxNodes})`,"array_elements");let o=e.args.map(p=>r(p.expr));if(e.name==="coalesce"){let p=Math.max(0,o.length-1)*7;if(p>n.maxNodes-n.nodes)throw new E(`xan: expression conversion AST limit exceeded (${n.maxNodes})`,"array_elements");if(n.nodes+=p,n.operations+=o.length,n.operations>n.maxOperations)throw new E(`xan: expression conversion operation limit exceeded (${n.maxOperations})`,"iterations")}let i=Object.hasOwn(le,e.name)?le[e.name]:void 0;return typeof i=="function"?i(o):O(typeof i=="string"?i:e.name,o)}case"list":return e.elements.length===0?{type:"Array"}:{type:"Array",elements:e.elements.reduce((o,i,p)=>{let h=r(i);return p===0?h:{type:"Comma",left:o,right:h}},null)};case"map":return{type:"Object",entries:e.entries.map(o=>({key:o.key,value:r(o.value)}))};case"regex":return{type:"Literal",value:e.pattern};case"slice":return{type:"Slice",start:e.start?r(e.start):void 0,end:e.end?r(e.end):void 0};case"lambda":return r(e.body);case"pipeline":return{type:"Identity"};default:throw new Error(`Unknown moonblade expression type: ${e.type}`)}}function Q(e){return e<2?0:Math.ceil(e*Math.log2(e))}function ue(e,t={}){let n=t.maxArrayElements??1e5,s=t.maxStringLength??10*1024*1024,r=t.maxIterations??1e5,o=t.maxDepth??100;if(K(e)>s)throw new E(`xan: aggregation expression length limit exceeded (${s} bytes)`,"string_length");let i=[],p=0,h=0,m=()=>{if(t.consumeWork?.(),++h>r)throw new E(`xan: aggregation parser operation limit exceeded (${r})`,"iterations")};for(;p<e.length;){for(m();p<e.length&&(e[p]===" "||e[p]===",");)p++;if(p>=e.length)break;let c=p;for(;p<e.length&&/\w/.test(e[p]);)p++;let a=e.slice(c,p);for(;p<e.length&&e[p]===" ";)p++;if(e[p]!=="(")break;p++;let d=1,u=p;for(;p<e.length&&d>0;){if(m(),e[p]==="("?d++:e[p]===")"&&d--,d>o)throw new E(`xan: aggregation parser depth limit exceeded (${o})`,"recursion");d>0&&p++}let l=e.slice(u,p).trim();for(p++;p<e.length&&e[p]===" ";)p++;let f="";if(e.slice(p,p+3).toLowerCase()==="as "){for(p+=3;p<e.length&&e[p]===" ";)p++;let x=p;for(;p<e.length&&/\w/.test(e[p]);)p++;f=e.slice(x,p)}if(f||(f=l?`${a}(${l})`:`${a}()`),i.length>=n)throw new E(`xan: aggregation specification limit exceeded (${n})`,"array_elements");i.push({func:a,expr:l,alias:f})}return i}function ft(e){return/^\w+$/.test(e)}function ht(e,t,n){let s=V(e,t,n);return s.length>0?s[0]:null}function ce(e,t,n={},s={}){let{func:r,expr:o}=t,i=s.maxArrayElements??1e5,p=s.maxStringLength??10*1024*1024,h=s.maxIterations??1e5,m={maxSourceLength:p,maxTokens:i,maxAstNodes:i,maxOperations:h,maxDepth:s.maxDepth??100};if(e.length>i)throw new E(`xan: aggregation input limit exceeded (${i})`,"array_elements");if(r==="count"&&!o)return e.length;let c=ft(o),a=c?null:U(B(o,m),!0,m),d;if(c)d=f=>f[o];else{if(a===null)throw new Error("xan: missing compiled aggregation expression");d=f=>ht(f,a,n)}if(r==="all"||r==="any"){let f=0;for(let x of e){if(s.consumeWork?.(),++f>h)throw new E(`xan: aggregation iteration limit exceeded (${h})`,"iterations");let g=!!d(x);if(r==="all"&&!g)return!1;if(r==="any"&&g)return!0}return r==="all"}let u=[],l=0;for(let f of e){if(s.consumeWork?.(),++l>h)throw new E(`xan: aggregation iteration limit exceeded (${h})`,"iterations");let x=d(f);if(x!=null){if(u.length>=i)throw new E(`xan: aggregation value limit exceeded (${i})`,"array_elements");u.push(x)}}switch(r){case"count":{if(c)return u.length;let f=0;for(let x of u)s.consumeWork?.(),x&&f++;return f}case"sum":{let f=0;for(let x of u)s.consumeWork?.(),f+=typeof x=="number"?x:Number.parseFloat(String(x));return f}case"mean":case"avg":{let f=0;for(let x of u)s.consumeWork?.(),f+=typeof x=="number"?x:Number.parseFloat(String(x));return u.length>0?f/u.length:0}case"min":{let f=null;for(let x of u){s.consumeWork?.();let g=typeof x=="number"?x:Number.parseFloat(String(x));f=f===null?g:Math.min(f,g)}return f}case"max":{let f=null;for(let x of u){s.consumeWork?.();let g=typeof x=="number"?x:Number.parseFloat(String(x));f=f===null?g:Math.max(f,g)}return f}case"first":return u.length>0?u[0]:null;case"last":return u.length>0?u[u.length-1]:null;case"median":{let f=[];for(let g of u){s.consumeWork?.();let y=typeof g=="number"?g:Number.parseFloat(String(g));Number.isNaN(y)||f.push(y)}if(s.consumeWork?.(Q(f.length)),f.sort((g,y)=>g-y),f.length===0)return null;let x=Math.floor(f.length/2);return f.length%2===0?(f[x-1]+f[x])/2:f[x]}case"mode":{let f=new Map;for(let y of u){s.consumeWork?.();let w=String(y);f.set(w,(f.get(w)||0)+1)}let x=0,g=null;for(let[y,w]of f)s.consumeWork?.(),w>x&&(x=w,g=y);return g}case"cardinality":{let f=new Set;for(let x of u)s.consumeWork?.(),f.add(String(x));return f.size}case"values":return ot(u,!1,p,s);case"distinct_values":return ot(u,!0,p,s);default:return null}}function it(e,t,n={},s={}){let r=F();for(let o of t)b(r,o.alias,ce(e,o,n,s));return r}function ot(e,t,n,s){let r=[],o=t?new Set:null,i=0;for(let p of e){s.consumeWork?.();let h=String(p);if(o?.has(h))continue;o?.add(h);let m=K(h)+(r.length>0?1:0);if(m>n-i)throw new E(`xan: aggregation string limit exceeded (${n} bytes)`,"string_length");r.push(h),i+=m}return t&&(s.consumeWork?.(Q(r.length)),r.sort()),r.join("|")}function lt(e,t){return{maxArrayElements:e.limits.maxArrayElements,maxStringLength:e.limits.maxStringLength,maxIterations:e.limits.maxJqIterations,maxDepth:e.limits.maxQueryDepth,consumeWork:(n=1)=>t.consumeWork(n)}}function at(e,t,n){let s=e.size-(t&&e.has("")?1:0);return n>0?Math.min(s,n):s}async function pe(e,t){let n="",s=[];for(let d of e)d.startsWith("-")||(n?s.push(d):n=d);if(!n)return{stdout:"",stderr:`xan agg: no aggregation expression
7
+ `,exitCode:1};let{data:r,error:o}=await k(s,t);if(o)return o;let i={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},p=new $(t,"xan agg"),h=lt(t,p),m=ue(n,h),c=m.map(d=>d.alias);p.addRow(c.length);let a=it(r,m,i,h);return{stdout:C(c,[a],t),stderr:"",exitCode:0}}async function de(e,t){let n="",s="",r=[];for(let x=0;x<e.length;x++){let g=e[x];g==="--sorted"||g.startsWith("-")||(n?s?r.push(g):s=g:n=g)}if(!n||!s)return{stdout:"",stderr:`xan groupby: usage: xan groupby COLS EXPR [FILE]
8
+ `,exitCode:1};let{data:o,error:i}=await k(r,t);if(i)return i;let p={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},h=n.split(","),m=new $(t,"xan groupby"),c=lt(t,m),a=ue(s,c),d=[...h,...a.map(x=>x.alias)],u=[],l=new Map;for(let x of o){m.consumeWork(h.length+1);let g=JSON.stringify(h.map(y=>String(x[y])));l.has(g)||(m.addRow(d.length),l.set(g,[]),u.push(g)),l.get(g)?.push(x)}let f=[];for(let x of u){let g=l.get(x);if(!g)continue;let y=F();for(let w of h)b(y,w,g[0][w]);for(let w of a)b(y,w.alias,ce(g,w,p,c));f.push(y)}return{stdout:C(d,f,t),stderr:"",exitCode:0}}async function me(e,t){let n=[],s="",r=10,o=!1,i=[];for(let l=0;l<e.length;l++){let f=e[l];(f==="-s"||f==="--select")&&l+1<e.length?n=e[++l].split(","):(f==="-g"||f==="--groupby")&&l+1<e.length?s=e[++l]:(f==="-l"||f==="--limit")&&l+1<e.length?r=Number.parseInt(e[++l],10):f==="--no-extra"?o=!0:f==="-A"||f==="--all"?r=0:f.startsWith("-")||i.push(f)}let{headers:p,data:h,error:m}=await k(i,t);if(m)return m;if(!Number.isSafeInteger(r)||r<0)return{stdout:"",stderr:`xan frequency: limit must be a non-negative safe integer
9
+ `,exitCode:1};let c=new $(t,"xan frequency"),a=n.length>0?n:p.filter(l=>l!==s);s&&n.length===0&&(a=p.filter(l=>l!==s));let d=[],u=s?["field",s,"value","count"]:["field","value","count"];if(s){let l=new Map;for(let f of h){c.consumeWork();let x=String(f[s]??"");l.has(x)||l.set(x,[]),l.get(x)?.push(f)}for(let f of a)for(let[x,g]of l){let y=new Map;for(let v of g){c.consumeWork();let I=v[f],S=I===""||I===null||I===void 0?"":String(I);y.set(S,(y.get(S)||0)+1)}c.addRows(at(y,o,r),u.length),c.consumeWork(Q(y.size));let w=[...y.entries()].sort((v,I)=>I[1]!==v[1]?I[1]-v[1]:v[0].localeCompare(I[0])),A=0;for(let[v,I]of w){if(o&&v==="")continue;if(r>0&&A>=r)break;let S=F();b(S,"field",f),b(S,s,x),b(S,"value",v===""?"<empty>":v),b(S,"count",I),d.push(S),A++}}}else for(let l of a){let f=new Map;for(let y of h){c.consumeWork();let w=y[l],A=w===""||w===null||w===void 0?"":String(w);f.set(A,(f.get(A)||0)+1)}c.addRows(at(f,o,r),u.length),c.consumeWork(Q(f.size));let x=[...f.entries()].sort((y,w)=>w[1]!==y[1]?w[1]-y[1]:y[0].localeCompare(w[0])),g=0;for(let[y,w]of x){if(o&&y==="")continue;if(r>0&&g>=r)break;let A=F();b(A,"field",l),b(A,"value",y===""?"<empty>":y),b(A,"count",w),d.push(A),g++}}return{stdout:C(u,d,t),stderr:"",exitCode:0}}async function fe(e,t){let n=[],s=[];for(let a=0;a<e.length;a++){let d=e[a];d==="-s"&&a+1<e.length?n=e[++a].split(","):d.startsWith("-")||s.push(d)}let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=n.length>0?n:r,h=["field","type","count","min","max","mean"];new $(t,"xan stats").addRows(p.length,h.length);let c=[];for(let a of p){let d=0,u=0,l=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,x=0;for(let w of o){t.executionScope?.consumeWork(1,"xan stats rows");let A=w[a];if(A==null)continue;d++;let v=typeof A=="number"?A:Number.parseFloat(String(A));Number.isNaN(v)||(u++,l=Math.min(l,v),f=Math.max(f,v),x+=v)}let g=u===d&&u>0,y=F();b(y,"field",a),b(y,"type",g?"Number":"String"),b(y,"count",d),b(y,"min",g?l:""),b(y,"max",g?f:""),b(y,"mean",g?Math.round(x/u*1e10)/1e10:""),c.push(y)}return{stdout:C(h,c,t),stderr:"",exitCode:0}}function ut(e,t={}){let n=B(e,t);return U(n,!0,t)}function gt(e){let n=e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return Z(`^${n}$`)}function te(e,t){let n=[],s=new Set;for(let r of e.split(",")){let o=r.trim();if(o.startsWith("!")){let m=o.slice(1),c=te(m,t);for(let a of c)s.add(a);continue}if(o==="*"){for(let m of t)n.includes(m)||n.push(m);continue}if(o.includes("*")){let m=gt(o);for(let c of t)m.test(c)&&!n.includes(c)&&n.push(c);continue}let i=o.match(/^([^:]*):([^:]*)$/);if(i&&(i[1]||i[2])){let m=i[1],c=i[2],a=m?t.indexOf(m):0,d=c?t.indexOf(c):t.length-1;if(a!==-1&&d!==-1){let u=a<=d?1:-1;for(let l=a;u>0?l<=d:l>=d;l+=u)n.includes(t[l])||n.push(t[l])}continue}let p=o.match(/^(\d+)-(\d+)$/);if(p){let m=Number.parseInt(p[1],10),c=Number.parseInt(p[2],10);for(let a=m;a<=c&&a<t.length;a++)n.push(t[a]);continue}let h=Number.parseInt(o,10);if(!Number.isNaN(h)&&h>=0&&h<t.length){n.push(t[h]);continue}t.includes(o)&&n.push(o)}return s.size>0?n.filter(r=>!s.has(r)):n}async function he(e,t){let n="",s=[];for(let m of e)m.startsWith("-")||(n?s.push(m):n=m);if(!n)return{stdout:"",stderr:`xan select: no columns specified
10
+ `,exitCode:1};let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=te(n,r),h=o.map(m=>{let c=F();for(let a of p)b(c,a,m[a]);return c});return{stdout:C(p,h,t),stderr:"",exitCode:0}}async function ge(e,t){let n="",s=[];for(let c of e)c.startsWith("-")||(n?s.push(c):n=c);if(!n)return{stdout:"",stderr:`xan drop: no columns specified
11
+ `,exitCode:1};let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=new Set(te(n,r)),h=r.filter(c=>!p.has(c)),m=o.map(c=>{let a=F();for(let d of h)b(a,d,c[d]);return a});return{stdout:C(h,m,t),stderr:"",exitCode:0}}async function xe(e,t){let n="",s="",r=[];for(let c=0;c<e.length;c++){let a=e[c];a==="-s"&&c+1<e.length?s=e[++c]:a.startsWith("-")||(n?r.push(a):n=a)}if(!n)return{stdout:"",stderr:`xan rename: no new name(s) specified
12
+ `,exitCode:1};let{headers:o,data:i,error:p}=await k(r,t);if(p)return p;let h;if(s){let c=s.split(","),a=n.split(","),d=new Map;for(let u=0;u<c.length&&u<a.length;u++)d.set(c[u],a[u]);h=o.map(u=>d.get(u)||u)}else{let c=n.split(",");h=o.map((a,d)=>d<c.length?c[d]:a)}let m=i.map(c=>{let a=F();for(let d=0;d<o.length;d++)b(a,h[d],c[o[d]]);return a});return{stdout:C(h,m,t),stderr:"",exitCode:0}}async function ye(e,t){let n="index",s=[];for(let m=0;m<e.length;m++)e[m]==="-c"&&m+1<e.length?n=e[++m]:s.push(e[m]);let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=[n,...r],h=o.map((m,c)=>{let a=F();b(a,n,c);for(let d of r)b(a,d,m[d]);return a});return{stdout:C(p,h,t),stderr:"",exitCode:0}}async function we(e,t){let n=e.includes("-j")||e.includes("--just-names"),{headers:s,error:r}=await k(e.filter(i=>i!=="-j"&&i!=="--just-names"),t);return r||{stdout:n?`${s.map(i=>i).join(`
13
+ `)}
14
+ `:`${s.map((i,p)=>`${p} ${i}`).join(`
15
+ `)}
16
+ `,stderr:"",exitCode:0}}async function ve(e,t){let{data:n,error:s}=await k(e,t);return s||{stdout:`${n.length}
17
+ `,stderr:"",exitCode:0}}async function Se(e,t){let n=10,s=[];for(let h=0;h<e.length;h++)(e[h]==="-l"||e[h]==="-n")&&h+1<e.length?n=Number.parseInt(e[++h],10):s.push(e[h]);let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=o.slice(0,n);return{stdout:C(r,p,t),stderr:"",exitCode:0}}async function be(e,t){let n=10,s=[];for(let h=0;h<e.length;h++)(e[h]==="-l"||e[h]==="-n")&&h+1<e.length?n=Number.parseInt(e[++h],10):s.push(e[h]);let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=o.slice(-n);return{stdout:C(r,p,t),stderr:"",exitCode:0}}async function Ce(e,t){let n,s,r,o=[];for(let d=0;d<e.length;d++){let u=e[d];(u==="-s"||u==="--start")&&d+1<e.length?n=Number.parseInt(e[++d],10):(u==="-e"||u==="--end")&&d+1<e.length?s=Number.parseInt(e[++d],10):(u==="-l"||u==="--len")&&d+1<e.length?r=Number.parseInt(e[++d],10):u.startsWith("-")||o.push(u)}let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m=n??0,c;r!==void 0?c=m+r:s!==void 0?c=s:c=p.length;let a=p.slice(m,c);return{stdout:C(i,a,t),stderr:"",exitCode:0}}async function ke(e,t){let{headers:n,data:s,error:r}=await k(e,t);if(r)return r;let o=[...s].reverse();return{stdout:C(n,o,t),stderr:"",exitCode:0}}async function Ee(e,t){let n=e.filter(m=>!m.startsWith("-")),{headers:s,data:r,error:o}=await k(n,t);if(o)return o;if(r.length===0){let m=["column"],c=s.map(a=>({column:a}));return{stdout:C(m,c,t),stderr:"",exitCode:0}}let i=s[0],p=[i,...r.map((m,c)=>String(m[i]??`row_${c}`))];if(new Set(p).size!==p.length)return{stdout:"",stderr:`xan transpose: duplicate output headers
18
+ `,exitCode:1};let h=[];for(let m=1;m<s.length;m++){let c=s[m],a=F();b(a,i,c);for(let d=0;d<r.length;d++)b(a,p[d+1],r[d][c]);h.push(a)}return{stdout:C(p,h,t),stderr:"",exitCode:0}}async function Ie(e,t){let n=null,s=[];for(let c=0;c<e.length;c++){let a=e[c];a==="--seed"&&c+1<e.length?n=Number.parseInt(e[++c],10):a.startsWith("-")||s.push(a)}let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=n!==null?n:Date.now(),h=()=>(p=p*1103515245+12345&2147483647,p/2147483647),m=[...o];for(let c=m.length-1;c>0;c--){let a=Math.floor(h()*(c+1));[m[c],m[a]]=[m[a],m[c]]}return{stdout:C(r,m,t),stderr:"",exitCode:0}}async function Ne(e,t){let n=null,s="",r=[];for(let a=0;a<e.length;a++){let d=e[a];if((d==="-l"||d==="--length")&&a+1<e.length){let u=e[++a];if(!/^[1-9]\d*$/.test(u))return{stdout:"",stderr:`xan fixlengths: length must be a positive safe integer
19
+ `,exitCode:1};if(n=Number(u),!Number.isSafeInteger(n)||n>t.limits.maxArrayElements)throw new E(`xan fixlengths: column limit exceeded (${t.limits.maxArrayElements})`,"array_elements")}else(d==="-d"||d==="--default")&&a+1<e.length?s=e[++a]:d.startsWith("-")||r.push(d)}let o=r[0],i;if(!o||o==="-")i=Y(t.stdin);else try{let a=t.fs.resolvePath(t.cwd,o);i=await t.fs.readFile(a)}catch(a){return q(a),{stdout:"",stderr:`xan fixlengths: ${o}: No such file or directory
20
+ `,exitCode:1}}let p=et(i,{maxStringLength:Math.min(t.limits.maxInputBytes,t.limits.maxStringLength),maxArrayElements:t.limits.maxArrayElements,maxRows:t.limits.maxCsvRows,maxCells:t.limits.maxCsvCells});if(p.length===0)return{stdout:"",stderr:"",exitCode:0};let h=0;for(let a of p)h=Math.max(h,a.length);let m=n??h;new $(t,"xan fixlengths").addRows(p.length,m);for(let a of p)for(a.length>m&&(a.length=m);a.length<m;)a.push(s);return{stdout:nt(p,t),stderr:"",exitCode:0}}async function Ae(e,t){let n=null,s=null,r=".",o=[],i=u=>{if(!/^[1-9]\d*$/.test(u))return null;let l=Number(u);return Number.isSafeInteger(l)?l:null};for(let u=0;u<e.length;u++){let l=e[u];if((l==="-c"||l==="--chunks")&&u+1<e.length){if(n=i(e[++u]),n===null)return{stdout:"",stderr:`xan split: chunk count must be a positive safe integer
21
+ `,exitCode:1}}else if((l==="-S"||l==="--size")&&u+1<e.length){if(s=i(e[++u]),s===null)return{stdout:"",stderr:`xan split: chunk size must be a positive safe integer
22
+ `,exitCode:1}}else(l==="-o"||l==="--output")&&u+1<e.length?r=e[++u]:l.startsWith("-")||o.push(l)}if(!n&&!s)return{stdout:"",stderr:`xan split: must specify -c or -S
23
+ `,exitCode:1};let{headers:p,data:h,error:m}=await k(o,t);if(m)return m;let c=n?Math.ceil(h.length/n):s,a=c===0?0:Math.ceil(h.length/c);if(a>t.limits.maxArrayElements)throw new E(`xan split: output part limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let d=o[0]?.replace(/\.csv$/,"")||"part";try{let u=t.fs.resolvePath(t.cwd,r);for(let l=0;l<a;l++){let f=l*c,x=Math.min(f+c,h.length);t.executionScope?.consumeWork(x-f,"xan split rows");let g=`${d}_${String(l+1).padStart(3,"0")}.csv`,y=t.fs.resolvePath(u,g);await t.fs.writeFile(y,C(p,h.slice(f,x),t))}return{stdout:`Split into ${a} parts
24
+ `,stderr:"",exitCode:0}}catch(u){q(u);let l=new re(t.limits.maxOutputSize,"xan split");for(let f=0;f<a;f++){let x=f*c,g=Math.min(x+c,h.length);l.append(`Part ${f+1}: ${g-x} rows
25
+ `)}return{stdout:l.build(),stderr:"",exitCode:0}}}function ct(e){return e.replace(/[^a-zA-Z0-9_-]/g,"_")||"empty"}function xt(e){let t=2166136261;for(let n=0;n<e.length;n++)t=(t^e.charCodeAt(n))*16777619>>>0;return t.toString(36).padStart(6,"0").slice(0,6)}async function Le(e,t){let n="",s=".",r=[];for(let u=0;u<e.length;u++){let l=e[u];(l==="-o"||l==="--output")&&u+1<e.length?s=e[++u]:l.startsWith("-")||(n?r.push(l):n=l)}if(!n)return{stdout:"",stderr:`xan partition: usage: xan partition COLUMN [FILE]
26
+ `,exitCode:1};let{headers:o,data:i,error:p}=await k(r,t);if(p)return p;if(!o.includes(n))return{stdout:"",stderr:`xan partition: column '${n}' not found
27
+ `,exitCode:1};let h=new Map,m=new $(t,"xan partition");for(let u of i){m.addRow(o.length);let l=String(u[n]??"");h.has(l)||h.set(l,[]),h.get(l)?.push(u)}let c=new Map;for(let u of h.keys()){let l=ct(u);c.set(l,(c.get(l)??0)+1)}let a=new Set,d=new Map;for(let u of h.keys()){let l=ct(u),x=(c.get(l)??0)>1?`${l}_${xt(u)}`:l,g=`${x}.csv`,y=1;for(;a.has(g);)g=`${x}_${y}.csv`,y++;a.add(g),d.set(u,g)}try{let u=t.fs.resolvePath(t.cwd,s);for(let[l,f]of h){let x=d.get(l);if(!x)continue;let g=t.fs.resolvePath(u,x);await t.fs.writeFile(g,C(o,f,t))}return{stdout:`Partitioned into ${h.size} files by '${n}'
28
+ `,stderr:"",exitCode:0}}catch(u){q(u);let l=new re(t.limits.maxOutputSize,"xan partition");for(let[f,x]of h)l.append(`${f}: ${x.length} rows
29
+ `);return{stdout:l.build(),stderr:"",exitCode:0}}}async function Oe(e,t){if(e.length===0)return{stdout:"",stderr:`xan to: usage: xan to <format> [FILE]
30
+ `,exitCode:1};let n=e[0],s=e.slice(1);return n==="json"?yt(s,t):{stdout:"",stderr:`xan to: unsupported format '${n}'
31
+ `,exitCode:1}}async function yt(e,t){let n=e.filter(h=>!h.startsWith("-")),{data:s,error:r}=await k(n,t);if(r)return r;if(new $(t,"xan to json").addRows(s.length,s.length>0?Object.keys(s[0]).length:0),t.limits.maxOutputSize<1)throw new E("xan to json: output size limit exceeded (0 bytes)","output_size");let i=t.limits.maxOutputSize-1;return{stdout:`${Qe(s,i)}
32
+ `,stderr:"",exitCode:0}}async function Re(e,t){let n="",s=[];for(let r=0;r<e.length;r++){let o=e[r];(o==="-f"||o==="--format")&&r+1<e.length?n=e[++r]:o.startsWith("-")||s.push(o)}return n?n==="json"?wt(s,t):{stdout:"",stderr:`xan from: unsupported format '${n}'
33
+ `,exitCode:1}:{stdout:"",stderr:`xan from: usage: xan from -f <format> [FILE]
34
+ `,exitCode:1}}async function wt(e,t){let n=e[0],s;if(!n||n==="-")s=Y(t.stdin);else try{let r=t.fs.resolvePath(t.cwd,n);s=await t.fs.readFile(r)}catch(r){return q(r),{stdout:"",stderr:`xan from: ${n}: No such file or directory
35
+ `,exitCode:1}}try{let r=Math.min(t.limits.maxInputBytes,t.limits.maxStringLength);if(K(s)>r)throw new E(`xan from: input size limit exceeded (${r} bytes)`,"string_length");let o=Ge(JSON.parse(s.trim()),{maxDepth:t.limits.maxQueryDepth,maxElements:t.limits.maxQueryElements});if(!Array.isArray(o))return{stdout:"",stderr:`xan from: JSON input must be an array
36
+ `,exitCode:1};if(o.length===0)return{stdout:`
37
+ `,stderr:"",exitCode:0};if(Array.isArray(o[0])){let m=o,c=m[0];if(c.length>t.limits.maxArrayElements)throw new E(`xan from: column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let a=c.map(String);new $(t,"xan from json").addRows(m.length-1,a.length);let u=[];for(let l=1;l<m.length;l++){let f=m[l];if(!Array.isArray(f))return{stdout:"",stderr:`xan from: JSON rows must all have the same shape
38
+ `,exitCode:1};let x=F();for(let g=0;g<a.length;g++)b(x,a[g],f[g]);u.push(x)}return{stdout:C(a,u,t),stderr:"",exitCode:0}}let i=o[0];if(!i||typeof i!="object"||Array.isArray(i))return{stdout:"",stderr:`xan from: JSON rows must be arrays or objects
39
+ `,exitCode:1};let p=Object.keys(i).sort();new $(t,"xan from json").addRows(o.length,p.length);for(let m of o)if(!m||typeof m!="object"||Array.isArray(m))return{stdout:"",stderr:`xan from: JSON rows must all have the same shape
40
+ `,exitCode:1};return{stdout:C(p,o,t),stderr:"",exitCode:0}}catch(r){return q(r),{stdout:"",stderr:`xan from: invalid JSON input
41
+ `,exitCode:1}}}async function $e(e,t){let n=!1,s=0,r="",o=[];for(let d=0;d<e.length;d++){let u=e[d];if(u==="-v"||u==="--invert")n=!0;else if((u==="-l"||u==="--limit")&&d+1<e.length)s=Number.parseInt(e[++d],10);else{if(u==="--help")return J({name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output to N rows"," --help display help"]});u.startsWith("-")||(r?o.push(u):r=u)}}if(!r)return{stdout:"",stderr:`xan filter: no expression specified
42
+ `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},c=ut(r,z(t)),a=[];for(let d of p){if(s>0&&a.length>=s)break;let u=V(d,c,m),l=u.length>0&&u.some(f=>!!f);(n?!l:l)&&a.push(d)}return{stdout:C(i,a,t),stderr:"",exitCode:0}}async function Fe(e,t){let n="",s=!1,r=!1,o=[];for(let c=0;c<e.length;c++){let a=e[c];a==="-N"||a==="--numeric"?s=!0:a==="-R"||a==="-r"||a==="--reverse"?r=!0:a==="-s"&&c+1<e.length?n=e[++c]:a.startsWith("-")||o.push(a)}let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;!n&&i.length>0&&(n=i[0]);let m=[...p].sort((c,a)=>{let d=c[n],u=a[n],l;if(s){let f=typeof d=="number"?d:Number.parseFloat(String(d)),x=typeof u=="number"?u:Number.parseFloat(String(u));l=f-x}else l=String(d).localeCompare(String(u));return r?-l:l});return{stdout:C(i,m,t),stderr:"",exitCode:0}}async function Te(e,t){let n="",s=[];for(let m=0;m<e.length;m++){let c=e[m];c==="-s"&&m+1<e.length?n=e[++m]:c.startsWith("-")||s.push(c)}let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=new Set,h=o.filter(m=>{let c=n?String(m[n]):JSON.stringify(m);return p.has(c)?!1:(p.add(c),!0)});return{stdout:C(r,h,t),stderr:"",exitCode:0}}async function Me(e,t){let n=10,s="",r=!1,o=[];for(let a=0;a<e.length;a++){let d=e[a];(d==="-l"||d==="-n")&&a+1<e.length?n=Number.parseInt(e[++a],10):d==="-R"||d==="-r"||d==="--reverse"?r=!0:d.startsWith("-")||(s?o.push(d):s=d)}let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;!s&&i.length>0&&(s=i[0]);let c=[...p].sort((a,d)=>{let u=a[s],l=d[s],f=typeof u=="number"?u:Number.parseFloat(String(u)),x=typeof l=="number"?l:Number.parseFloat(String(l));return r?f-x:x-f}).slice(0,n);return{stdout:C(i,c,t),stderr:"",exitCode:0}}async function Pe(e,t){let n="",s=!1,r=!1,o=[];for(let x=0;x<e.length;x++){let g=e[x];g==="-O"||g==="--overwrite"?s=!0:g==="--filter"?r=!0:g.startsWith("-")||(n?o.push(g):n=g)}if(!n)return{stdout:"",stderr:`xan map: no expression specified
43
+ `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m=z(t),a=X(n,m).map(({expr:x,name:g})=>({alias:typeof g=="string"?g:g[0],ast:U(x,!0,m)})),d={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},u;if(s){u=[...i];for(let x of a)if(!i.includes(x.alias)){if(u.length>=t.limits.maxArrayElements)throw new E(`xan map: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");u.push(x.alias)}}else{if(W(i.length,a.length,"xan map")>t.limits.maxArrayElements)throw new E(`xan map: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");u=[...i,...a.map(x=>x.alias)]}let l=[],f=new $(t,"xan map");r||f.addRows(p.length,u.length);for(let x=0;x<p.length;x++){let g=p[x],y=j(g),w=!1,A=Object.assign(oe(g),{_row_index:x});for(let v of a){f.consumeWork();let I=V(A,v.ast,d),S=I.length>0?I[0]:null;if(r&&S==null){w=!0;break}b(y,v.alias,S)}w||(r&&f.addRow(u.length),l.push(y))}return{stdout:C(u,l,t),stderr:"",exitCode:0}}async function De(e,t){let n="",s="",r="",o=[];for(let g=0;g<e.length;g++){let y=e[g];(y==="-r"||y==="--rename")&&g+1<e.length?r=e[++g]:y.startsWith("-")||(n?s?o.push(y):s=y:n=y)}if(!n||!s)return{stdout:"",stderr:`xan transform: usage: xan transform COLUMN EXPR [FILE]
44
+ `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;let m=n.split(",").map(g=>g.trim()),c=r?r.split(",").map(g=>g.trim()):[];for(let g of m)if(!i.includes(g))return{stdout:"",stderr:`xan transform: column '${g}' not found
45
+ `,exitCode:1};let a=z(t),d=U(X(s,a)[0]?.expr||B(s,a),!0,a),u={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0},l=i.map(g=>{let y=m.indexOf(g);return y!==-1&&c[y]?c[y]:g}),f=[],x=new $(t,"xan transform");x.addRows(p.length,l.length);for(let g of p){let y=j(g);for(let w=0;w<m.length;w++){x.consumeWork();let A=m[w],v=Object.assign(oe(g),{_:g[A]}),I=V(v,d,u),S=I.length>0?I[0]:null,N=c[w]||A;N!==A&&delete y[A],b(y,N,S)}f.push(y)}return{stdout:C(l,f,t),stderr:"",exitCode:0}}async function _e(e,t){let n="",s="|",r=!1,o="",i=[];for(let l=0;l<e.length;l++){let f=e[l];(f==="-s"||f==="--separator")&&l+1<e.length?s=e[++l]:f==="--drop-empty"?r=!0:(f==="-r"||f==="--rename")&&l+1<e.length?o=e[++l]:f.startsWith("-")||(n?i.push(f):n=f)}if(!n)return{stdout:"",stderr:`xan explode: usage: xan explode COLUMN [FILE]
46
+ `,exitCode:1};let{headers:p,data:h,error:m}=await k(i,t);if(m)return m;if(!p.includes(n))return{stdout:"",stderr:`xan explode: column '${n}' not found
47
+ `,exitCode:1};let c=o?p.map(l=>l===n?o:l):p,a=o||n,d=[],u=new $(t,"xan explode");for(let l of h){let f=l[n],x=f==null?"":String(f);if(x===""){if(!r){u.addRow(c.length);let g=j(l);o&&(delete g[n],b(g,a,"")),d.push(g)}}else{let g=0;for(;g<=x.length;){u.addRow(c.length);let y=s===""?g+1:x.indexOf(s,g),w=y===-1?x.length:y,A=x.slice(g,w),v=j(l);if(o&&delete v[n],b(v,a,A),d.push(v),y===-1||s===""&&g>=x.length-1)break;g=s===""?y:y+s.length}}}return{stdout:C(c,d,t),stderr:"",exitCode:0}}async function We(e,t){let n="",s="|",r="",o=[];for(let g=0;g<e.length;g++){let y=e[g];(y==="-s"||y==="--sep")&&g+1<e.length?s=e[++g]:(y==="-r"||y==="--rename")&&g+1<e.length?r=e[++g]:y.startsWith("-")||(n?o.push(y):n=y)}if(!n)return{stdout:"",stderr:`xan implode: usage: xan implode COLUMN [FILE]
48
+ `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;if(!i.includes(n))return{stdout:"",stderr:`xan implode: column '${n}' not found
49
+ `,exitCode:1};let m=i.filter(g=>g!==n),c=r?i.map(g=>g===n?r:g):i,a=r||n,d=[],u=new $(t,"xan implode"),l=null,f=[],x=null;for(let g of p){u.consumeWork();let y=JSON.stringify(m.map(v=>String(g[v]??""))),w=g[n],A=w==null?"":String(w);if(y!==l){if(x!==null){let v=j(x);r&&delete v[n],b(v,a,se(f,s,Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),"xan implode")),u.addRow(c.length),d.push(v)}l=y,f=[A],x=g}else f.push(A)}if(x!==null){let g=j(x);r&&delete g[n],b(g,a,se(f,s,Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),"xan implode")),u.addRow(c.length),d.push(g)}return{stdout:C(c,d,t),stderr:"",exitCode:0}}async function je(e,t){let n="",s="",r="",o="",i="inner",p="",h=0;for(let S=0;S<e.length;S++){let N=e[S];N==="--left"?i="left":N==="--right"?i="right":N==="--full"?i="full":(N==="-D"||N==="--default")&&S+1<e.length?p=e[++S]:N.startsWith("-")||(h++,h===1?n=N:h===2?s=N:h===3?r=N:h===4&&(o=N))}if(!n||!s||!r||!o)return{stdout:"",stderr:`xan join: usage: xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]
50
+ `,exitCode:1};let m=await k([s],t);if(m.error)return m.error;let c=await k([o],t);if(c.error)return c.error;let{headers:a,data:d}=m,{headers:u,data:l}=c;if(!a.includes(n))return{stdout:"",stderr:`xan join: column '${n}' not found in first file
51
+ `,exitCode:1};if(!u.includes(r))return{stdout:"",stderr:`xan join: column '${r}' not found in second file
52
+ `,exitCode:1};let f=new Map;for(let S of l){t.executionScope?.consumeWork(1,"xan join index");let N=String(S[r]??"");f.has(N)||f.set(N,[]),f.get(N)?.push(S)}let x=new Set(a),g=u.filter(S=>!x.has(S));if(W(a.length,g.length,"xan join")>t.limits.maxArrayElements)throw new E(`xan join: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let y=[...a,...g],w=[],A=new $(t,"xan join"),v=new Set,I=0;for(let S of d){t.executionScope?.consumeWork(1,"xan join cardinality");let N=f.get(String(S[n]??""));I=W(I,N?.length??(i==="left"||i==="full"?1:0),"xan join")}if(i==="right"||i==="full"){let S=new Set;for(let N of d)t.executionScope?.throwIfAborted("xan join cardinality"),S.add(String(N[n]??""));for(let N of l)t.executionScope?.throwIfAborted("xan join cardinality"),S.has(String(N[r]??""))||(I=W(I,1,"xan join"))}A.addRows(I,y.length);for(let S of d){t.executionScope?.throwIfAborted("xan join output");let N=String(S[n]??""),P=f.get(N);if(P&&P.length>0){v.add(N);for(let T of P){let _=F();for(let H of a)b(_,H,S[H]);for(let H of g)b(_,H,T[H]);w.push(_)}}else if(i==="left"||i==="full"){let T=F();for(let _ of a)b(T,_,S[_]);for(let _ of g)b(T,_,p);w.push(T)}}if(i==="right"||i==="full")for(let S of l){t.executionScope?.throwIfAborted("xan join output");let N=String(S[r]??"");if(!v.has(N)){let P=F();for(let T of a)b(P,T,u.includes(T)?S[T]:p);for(let T of g)b(P,T,S[T]);w.push(P)}}return{stdout:C(y,w,t),stderr:"",exitCode:0}}async function Ve(e,t){let n="",s="",r=[],o=[];for(let v=0;v<e.length;v++){let I=e[v];(I==="-g"||I==="--groupby")&&v+1<e.length?r=e[++v].split(",").map(S=>S.trim()):I.startsWith("-")||(n?s?o.push(I):s=I:n=I)}if(!n||!s)return{stdout:"",stderr:`xan pivot: usage: xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]
53
+ `,exitCode:1};let{headers:i,data:p,error:h}=await k(o,t);if(h)return h;if(!i.includes(n))return{stdout:"",stderr:`xan pivot: column '${n}' not found
54
+ `,exitCode:1};let m=s.match(/^(\w+)\((\w+)\)$/);if(!m)return{stdout:"",stderr:`xan pivot: invalid aggregation expression '${s}'
55
+ `,exitCode:1};let[,c,a]=m;r.length===0&&(r=i.filter(v=>v!==n&&v!==a));let d=[],u=new Set;for(let v of p){t.executionScope?.consumeWork(1,"xan pivot values");let I=String(v[n]??"");if(!u.has(I)){if(d.length>=t.limits.maxArrayElements)throw new E(`xan pivot: pivot value limit exceeded (${t.limits.maxArrayElements})`,"array_elements");u.add(I),d.push(I)}}let l=new Map,f=[];for(let v of p){t.executionScope?.consumeWork(1,"xan pivot groups");let I=r.map(_=>String(v[_]??"")),S=JSON.stringify(I),N=String(v[n]??""),P=v[a];l.has(S)||(l.set(S,{keyParts:I,pivots:new Map}),f.push(S));let T=l.get(S);T&&(T.pivots.has(N)||T.pivots.set(N,[]),T.pivots.get(N)?.push(P))}let x=d.find(v=>r.includes(v));if(x!==void 0)return{stdout:"",stderr:`xan pivot: duplicate output header '${x}'
56
+ `,exitCode:1};let g=W(r.length,d.length,"xan pivot");if(g>t.limits.maxArrayElements)throw new E(`xan pivot: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");new $(t,"xan pivot").addRows(f.length,g);let w=[...r,...d],A=[];for(let v of f){t.executionScope?.throwIfAborted("xan pivot output");let I=l.get(v);if(!I)continue;let S=F();for(let N=0;N<r.length;N++)b(S,r[N],I.keyParts[N]);for(let N of d){let P=I.pivots.get(N)||[];b(S,N,vt(c,P))}A.push(S)}return{stdout:C(w,A,t),stderr:"",exitCode:0}}function vt(e,t){let n=0,s=0,r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let i of t){if(i==null)continue;let p=typeof i=="number"?i:Number.parseFloat(String(i));Number.isNaN(p)||(n++,s+=p,r=Math.min(r,p),o=Math.max(o,p))}switch(e){case"count":return t.length;case"sum":return s;case"mean":case"avg":return n>0?s/n:null;case"min":return n>0?r:null;case"max":return n>0?o:null;case"first":return t.length>0?String(t[0]??""):null;case"last":return t.length>0?String(t[t.length-1]??""):null;default:return null}}async function Ue(e,t){let n="",s=[];for(let m=0;m<e.length;m++){let c=e[m];(c==="-s"||c==="--sort")&&m+1<e.length?n=e[++m]:c.startsWith("-")||s.push(c)}if(s.length<2)return{stdout:"",stderr:`xan merge: usage: xan merge [OPTIONS] FILE1 FILE2 ...
57
+ `,exitCode:1};let r=[],o=null;for(let m of s){let c=await k([m],t);if(c.error)return c.error;if(o===null)o=c.headers;else if(JSON.stringify(o)!==JSON.stringify(c.headers))return{stdout:"",stderr:`xan merge: all files must have the same headers
58
+ `,exitCode:1};r.push({headers:c.headers,data:c.data})}if(!o)return{stdout:"",stderr:"",exitCode:0};let i=[],p=new $(t,"xan merge"),h=r.reduce((m,c)=>W(m,c.data.length,"xan merge"),0);p.addRows(h,o.length);for(let{data:m}of r)for(let c of m)t.executionScope?.throwIfAborted("xan merge output"),i.push(c);if(n){if(!o.includes(n))return{stdout:"",stderr:`xan merge: column '${n}' not found
59
+ `,exitCode:1};i.sort((m,c)=>{let a=m[n],d=c[n],u=typeof a=="number"?a:Number.parseFloat(String(a)),l=typeof d=="number"?d:Number.parseFloat(String(d));return!Number.isNaN(u)&&!Number.isNaN(l)?u-l:String(a??"").localeCompare(String(d??""))})}return{stdout:C(o,i,t),stderr:"",exitCode:0}}async function ze(e,t){let n=e.filter(p=>!p.startsWith("-")),{headers:s,data:r,error:o}=await k(n,t);return o||(r.length===0?{stdout:"",stderr:"",exitCode:0}:(new $(t,"xan behead").addRows(r.length,s.length),{stdout:tt(s,r,t),stderr:"",exitCode:0}))}async function qe(e,t){let n=null,s=null,r=[];for(let d=0;d<e.length;d++){let u=e[d];if(u==="--seed"&&d+1<e.length)s=Number.parseInt(e[++d],10);else if(!u.startsWith("-")){let l=Number.parseInt(u,10);n===null&&!Number.isNaN(l)&&l>0?n=l:r.push(u)}}if(n===null)return{stdout:"",stderr:`xan sample: usage: xan sample <sample-size> [FILE]
60
+ `,exitCode:1};let{headers:o,data:i,error:p}=await k(r,t);if(p)return p;if(i.length<=n)return{stdout:C(o,i,t),stderr:"",exitCode:0};let h=s!==null?s:Date.now(),m=()=>(h=h*1103515245+12345&2147483647,h/2147483647),c=i.map((d,u)=>u);for(let d=c.length-1;d>0;d--){let u=Math.floor(m()*(d+1));[c[d],c[u]]=[c[u],c[d]]}let a=c.slice(0,n).sort((d,u)=>d-u).map(d=>i[d]);return{stdout:C(o,a,t),stderr:"",exitCode:0}}async function Je(e,t){let n=!1,s=[];for(let c=0;c<e.length;c++){let a=e[c];a==="-p"||a==="--pad"?n=!0:a.startsWith("-")||s.push(a)}if(s.length===0)return{stdout:"",stderr:`xan cat: no files specified
61
+ `,exitCode:1};let r=await Ye(t,s,{cmdName:"xan cat",stopOnError:!0});if(r.exitCode!==0)return{stdout:"",stderr:r.stderr,exitCode:r.exitCode};let o=[],i=[],p=new $(t,"xan cat"),h=new Set;for(let{content:c}of r.files){let{headers:a,data:d}=Ze(Y(c),{maxStringLength:Math.min(t.limits.maxInputBytes,t.limits.maxStringLength),maxArrayElements:t.limits.maxArrayElements,maxRows:t.limits.maxCsvRows,maxCells:t.limits.maxCsvCells});p.addRows(d.length,a.length),o.push({headers:a,data:d});for(let u of a)if(!h.has(u)){if(h.add(u),h.size>t.limits.maxArrayElements)throw new E(`xan cat: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");i.push(u)}}if(!n){let c=JSON.stringify(o[0].headers);for(let a=1;a<o.length;a++)if(JSON.stringify(o[a].headers)!==c)return{stdout:"",stderr:`xan cat: headers do not match (use -p to pad)
62
+ `,exitCode:1};i=o[0].headers}let m=[];for(let{headers:c,data:a}of o)for(let d of a){let u=F();for(let l of i)b(u,l,c.includes(l)?d[l]:"");m.push(u)}return{stdout:C(i,m,t),stderr:"",exitCode:0}}async function Be(e,t){let n="",s=[],r=!1,o=!1,i=[];for(let u=0;u<e.length;u++){let l=e[u];(l==="-s"||l==="--select")&&u+1<e.length?s=e[++u].split(","):l==="-v"||l==="--invert"?r=!0:l==="-i"||l==="--ignore-case"?o=!0:l==="-r"||l==="--regex"||l.startsWith("-")||(n?i.push(l):n=l)}if(!n)return{stdout:"",stderr:`xan search: no pattern specified
63
+ `,exitCode:1};let{headers:p,data:h,error:m}=await k(i,t);if(m)return m;let c=s.length>0?s:p,a;try{a=Z(n,o?"i":"")}catch{return{stdout:"",stderr:`xan search: invalid regex pattern '${n}'
64
+ `,exitCode:1}}let d=h.filter(u=>{let l=c.some(f=>{let x=u[f];return x!=null&&a.test(String(x))});return r?!l:l});return{stdout:C(p,d,t),stderr:"",exitCode:0}}async function He(e,t){let n="",s=[];for(let l of e)l.startsWith("-")||(n?s.push(l):n=l);if(!n)return{stdout:"",stderr:`xan flatmap: no expression specified
65
+ `,exitCode:1};let{headers:r,data:o,error:i}=await k(s,t);if(i)return i;let p=z(t),m=X(n,p).map(({expr:l,name:f})=>({alias:typeof f=="string"?f:f[0],ast:U(l,!0,p)})),c={limits:t.limits?{maxIterations:t.limits.maxJqIterations,maxStringLength:t.limits.maxStringLength}:void 0};if(W(r.length,m.length,"xan flatmap")>t.limits.maxArrayElements)throw new E(`xan flatmap: output column limit exceeded (${t.limits.maxArrayElements})`,"array_elements");let a=[...r,...m.map(l=>l.alias)],d=[],u=new $(t,"xan flatmap");for(let l of o){let f=[],x=1;for(let g of m){u.consumeWork();let y=V(l,g.ast,c),w=y.length>0&&Array.isArray(y[0])?y[0]:y;if(w.length>t.limits.maxArrayElements)throw new E(`xan flatmap: expression result limit exceeded (${t.limits.maxArrayElements})`,"array_elements");f.push(w),x=Math.max(x,w.length)}for(let g=0;g<x;g++){u.addRow(a.length);let y=j(l);for(let w=0;w<m.length;w++){let A=f[w][g]??null;b(y,m[w].alias,A)}d.push(y)}}return{stdout:C(a,d,t),stderr:"",exitCode:0}}async function Ke(e,t){let{cmdView:n}=await import("./xan-view-LYATQWQB.js");return n(e,t)}var dt=new Set(["fuzzy-join","glob","hist","input","parallel","plot","progress","range","scrape","tokenize","union-find"]),St=new Set(["agg","behead","cat","count","dedup","drop","enum","explode","f","filter","fixlengths","flatmap","flatten","fmt","frequency","freq","from","groupby","head","headers","implode","join","map","merge","partition","pivot","rename","reverse","sample","search","select","shuffle","slice","sort","split","stats","tail","to","top","transform","transpose","view",...dt]),pt={name:"xan",summary:"CSV toolkit for data manipulation",usage:"xan <COMMAND> [OPTIONS] [FILE]",description:`xan is a collection of commands for working with CSV data.
66
+ It provides a simple, ergonomic interface for common data operations.
67
+
68
+ COMMANDS:
69
+ Core:
70
+ headers Show column names
71
+ count Count rows
72
+ head Show first N rows
73
+ tail Show last N rows
74
+ slice Extract row range
75
+ reverse Reverse row order
76
+ behead Remove header row
77
+ sample Random sample of rows
78
+
79
+ Column operations:
80
+ select Select columns (supports glob, ranges, negation)
81
+ drop Drop columns
82
+ rename Rename columns
83
+ enum Add row index column
84
+
85
+ Row operations:
86
+ filter Filter rows by expression
87
+ search Filter rows by regex match
88
+ sort Sort rows
89
+ dedup Remove duplicates
90
+ top Get top N by column
91
+
92
+ Transformations:
93
+ map Add computed columns
94
+ transform Modify existing columns
95
+ explode Split column into multiple rows
96
+ implode Combine rows, join column values
97
+ flatmap Map returning multiple rows
98
+ pivot Reshape rows into columns
99
+ transpose Swap rows and columns
100
+
101
+ Aggregation:
102
+ agg Aggregate values
103
+ groupby Group and aggregate
104
+ frequency Count value occurrences
105
+ stats Show column statistics
106
+
107
+ Multi-file:
108
+ cat Concatenate CSV files
109
+ join Join two CSV files on key
110
+ merge Merge sorted CSV files
111
+ split Split into multiple files
112
+ partition Split by column value
113
+
114
+ Data conversion:
115
+ to Convert CSV to other formats (json)
116
+ from Convert other formats to CSV (json)
117
+ shuffle Randomly reorder rows
118
+ fixlengths Fix ragged CSV files
119
+
120
+ Output:
121
+ view Pretty print as table
122
+ flatten Display records vertically (alias: f)
123
+ fmt Format output
124
+
125
+ EXAMPLES:
126
+ xan headers data.csv
127
+ xan count data.csv
128
+ xan head -n 5 data.csv
129
+ xan select name,email data.csv
130
+ xan select 'vec_*' data.csv # glob pattern
131
+ xan select 'a:c' data.csv # column range
132
+ xan filter 'age > 30' data.csv
133
+ xan search -r '^foo' data.csv
134
+ xan sort -N price data.csv
135
+ xan agg 'sum(amount) as total' data.csv
136
+ xan groupby region 'count() as n' data.csv
137
+ xan explode tags data.csv
138
+ xan join id file1.csv id file2.csv
139
+ xan pivot year 'sum(sales)' data.csv`,options:[" --help display this help and exit"]},bt={headers:{name:"xan headers",summary:"Show column names",usage:"xan headers [OPTIONS] [FILE]",description:"Display column names from a CSV file.",options:["-j, --just-names show names only (no index)"]},count:{name:"xan count",summary:"Count rows",usage:"xan count [FILE]",description:"Count the number of data rows (excluding header).",options:[]},filter:{name:"xan filter",summary:"Filter rows by expression",usage:"xan filter [OPTIONS] EXPR [FILE]",description:"Filter CSV rows using moonblade expressions.",options:["-v, --invert invert match","-l, --limit N limit output rows"]},search:{name:"xan search",summary:"Filter rows by regex",usage:"xan search [OPTIONS] PATTERN [FILE]",description:"Filter CSV rows by regex match on columns.",options:["-s, --select COLS search only these columns","-v, --invert invert match","-i, --ignore-case case insensitive"]},select:{name:"xan select",summary:"Select columns",usage:"xan select COLS [FILE]",description:"Select columns by name, index, glob, or range.",options:["Supports: col names, indices (0,1), ranges (a:c), globs (vec_*), negation (!col)"]},explode:{name:"xan explode",summary:"Split column into rows",usage:"xan explode COLUMN [OPTIONS] [FILE]",description:"Split delimited column values into multiple rows.",options:["-s, --separator SEP separator (default: |)","--drop-empty drop empty values","-r, --rename NAME rename column"]},implode:{name:"xan implode",summary:"Combine rows",usage:"xan implode COLUMN [OPTIONS] [FILE]",description:"Combine consecutive rows, joining column values.",options:["-s, --sep SEP separator (default: |)","-r, --rename NAME rename column"]},join:{name:"xan join",summary:"Join CSV files",usage:"xan join KEY1 FILE1 KEY2 FILE2 [OPTIONS]",description:"Join two CSV files on key columns.",options:["--left left outer join","--right right outer join","--full full outer join","-D, --default VAL default for missing"]},pivot:{name:"xan pivot",summary:"Reshape to columns",usage:"xan pivot COLUMN AGG_EXPR [OPTIONS] [FILE]",description:"Turn row values into columns.",options:["-g, --groupby COLS group by columns"]}},Jn={name:"xan",async execute(e,t){if(e.length===0||ne(e))return J(pt);let n=e[0],s=e.slice(1);if(ne(s)){let r=bt[n];return r?J(r):J(pt)}if(dt.has(n))return{stdout:"",stderr:`xan ${n}: not yet implemented
140
+ `,exitCode:1};switch(n){case"headers":return we(s,t);case"count":return ve(s,t);case"head":return Se(s,t);case"tail":return be(s,t);case"slice":return Ce(s,t);case"reverse":return ke(s,t);case"behead":return ze(s,t);case"sample":return qe(s,t);case"select":return he(s,t);case"drop":return ge(s,t);case"rename":return xe(s,t);case"enum":return ye(s,t);case"filter":return $e(s,t);case"search":return Be(s,t);case"sort":return Fe(s,t);case"dedup":return Te(s,t);case"top":return Me(s,t);case"map":return Pe(s,t);case"transform":return De(s,t);case"explode":return _e(s,t);case"implode":return We(s,t);case"flatmap":return He(s,t);case"pivot":return Ve(s,t);case"agg":return pe(s,t);case"groupby":return de(s,t);case"frequency":case"freq":return me(s,t);case"stats":return fe(s,t);case"cat":return Je(s,t);case"join":return je(s,t);case"merge":return Ue(s,t);case"split":return Ae(s,t);case"partition":return Le(s,t);case"to":return Oe(s,t);case"from":return Re(s,t);case"transpose":return Ee(s,t);case"shuffle":return Ie(s,t);case"fixlengths":return Ne(s,t);case"view":return ae(s,t);case"flatten":case"f":return ie(s,t);case"fmt":return Ke(s,t);default:return St.has(n)?{stdout:"",stderr:`xan ${n}: not yet implemented
141
+ `,exitCode:1}:{stdout:"",stderr:`xan: unknown command '${n}'
142
+ Run 'xan --help' for usage.
143
+ `,exitCode:1}}}},Bn={name:"xan",flags:[],stdinType:"text",needsArgs:!0};export{Jn as a,Bn as b};