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,12 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as E,b as k,c as _,d as Ie,e as S,g as C,h as ce}from"./chunk-LNJ6EIKX.js";import{a as ue,c as je}from"./chunk-DLL7UR66.js";import{a as Me}from"./chunk-CHWP6GRK.js";import{a as P}from"./chunk-EOMWWW4L.js";import{e as G}from"./chunk-Q6ZH76O4.js";import{l as g}from"./chunk-IQGNPH54.js";import{a as j}from"./chunk-U3UTFNHI.js";function I(e){return e!==!1&&e!==null}function J(e,n){return JSON.stringify(e)===JSON.stringify(n)}function Y(e,n){return typeof e=="number"&&typeof n=="number"?e-n:typeof e=="string"&&typeof n=="string"?e.localeCompare(n):0}function xe(e,n,t={}){let r=t.maxDepth??2e3,s=C(e),o=[{target:s,source:n,depth:0}];for(;o.length>0;){let p=o.pop();if(!p)break;if(p.depth>r)throw new g(`query depth limit exceeded (${r})`,"recursion");for(let u of Object.keys(p.source)){if(t.visit?.(),!E(u))continue;let f=_(p.target,u)?S(p.target[u]):null,i=S(p.source[u]);if(f&&i){let c=C(f);k(p.target,u,c),o.push({target:c,source:i,depth:p.depth+1})}else k(p.target,u,p.source[u])}}return s}function B(e,n=3e3){if(e===null||typeof e!="object")return 0;if(n<=1)return n;let t=(i,c)=>({value:i,keys:Array.isArray(i)?void 0:Object.keys(i),nextChild:0,pathDepth:c,maxChildDepth:0}),r=i=>i.keys!==void 0?i.keys.length:i.value.length,s=i=>{if(i.keys){let c=i.keys[i.nextChild++];return i.value[c]}return i.value[i.nextChild++]},o=new WeakMap,p=new WeakMap,u=e,f=[t(u,1)];for(o.set(u,"visiting");f.length>0;){let i=f[f.length-1];if(i.nextChild<r(i)){let a=s(i);if(a===null||typeof a!="object")continue;let l=o.get(a);if(l==="visiting")return n;if(l==="done"){let b=p.get(a)??0;if(i.pathDepth+b>=n)return n;i.maxChildDepth=Math.max(i.maxChildDepth,b);continue}let y=i.pathDepth+1;if(y>=n)return n;let m=a;o.set(a,"visiting"),f.push(t(m,y));continue}let c=i.maxChildDepth+1;p.set(i.value,c),o.set(i.value,"done"),f.pop();let h=f.at(-1);if(h)h.maxChildDepth=Math.max(h.maxChildDepth,c);else return c}return 0}function Z(e,n){let t=u=>u===null?0:typeof u=="boolean"?1:typeof u=="number"?2:typeof u=="string"?3:Array.isArray(u)?4:typeof u=="object"?5:6,r=t(e),s=t(n);if(r!==s)return r-s;if(typeof e=="number"&&typeof n=="number")return e-n;if(typeof e=="string"&&typeof n=="string")return e.localeCompare(n);if(typeof e=="boolean"&&typeof n=="boolean")return(e?1:0)-(n?1:0);if(Array.isArray(e)&&Array.isArray(n)){for(let u=0;u<Math.min(e.length,n.length);u++){let f=Z(e[u],n[u]);if(f!==0)return f}return e.length-n.length}let o=S(e),p=S(n);if(o&&p){let u=Object.keys(o).sort(),f=Object.keys(p).sort();for(let i=0;i<Math.min(u.length,f.length);i++){let c=u[i].localeCompare(f[i]);if(c!==0)return c}if(u.length!==f.length)return u.length-f.length;for(let i of u){let c=Z(o[i],p[i]);if(c!==0)return c}}return 0}function v(e,n){if(J(e,n))return!0;if(typeof e=="string"&&typeof n=="string")return e.includes(n);if(Array.isArray(e)&&Array.isArray(n))return n.every(s=>e.some(o=>v(o,s)));let t=S(e),r=S(n);return t&&r?Object.keys(r).every(s=>_(t,s)&&v(t[s],r[s])):!1}function z(e,n,t=1){let r=e.limits.maxArrayElements;if(t<0||n>r-t)throw new g(`query result element limit exceeded (${r})`,"array_elements")}function he(e,n,t,r,s,o,p,u,f,i){switch(n){case"sort":return Array.isArray(e)?[[...e].sort(p)]:[null];case"sort_by":return!Array.isArray(e)||t.length===0?[null]:[[...e].sort((h,a)=>{let l=s(h,t[0],r)[0],y=s(a,t[0],r)[0];return p(l,y)})];case"bsearch":{if(!Array.isArray(e)){let h=e===null?"null":typeof e=="object"?"object":typeof e;throw new Error(`${h} (${JSON.stringify(e)}) cannot be searched from`)}return t.length===0?[null]:s(e,t[0],r).map(h=>{let a=0,l=e.length;for(;a<l;){let y=a+l>>>1;p(e[y],h)<0?a=y+1:l=y}return a<e.length&&p(e[a],h)===0?a:-a-1})}case"unique_by":{if(!Array.isArray(e)||t.length===0)return[null];let c=new Map;for(let a of e){let l=s(a,t[0],r)[0],y=JSON.stringify(l);c.has(y)||c.set(y,{item:a,key:l})}let h=[...c.values()];return h.sort((a,l)=>p(a.key,l.key)),[h.map(a=>a.item)]}case"group_by":{if(!Array.isArray(e)||t.length===0)return[null];let c=new Map;for(let h of e){let a=JSON.stringify(s(h,t[0],r)[0]);c.has(a)||c.set(a,[]),c.get(a)?.push(h)}return[[...c.values()]]}case"max":return Array.isArray(e)&&e.length>0?[e.reduce((c,h)=>p(c,h)>0?c:h)]:[null];case"max_by":return!Array.isArray(e)||e.length===0||t.length===0?[null]:[e.reduce((c,h)=>{let a=s(c,t[0],r)[0],l=s(h,t[0],r)[0];return p(a,l)>0?c:h})];case"min":return Array.isArray(e)&&e.length>0?[e.reduce((c,h)=>p(c,h)<0?c:h)]:[null];case"min_by":return!Array.isArray(e)||e.length===0||t.length===0?[null]:[e.reduce((c,h)=>{let a=s(c,t[0],r)[0],l=s(h,t[0],r)[0];return p(a,l)<0?c:h})];case"add":{let c=h=>{let a=h.filter(l=>l!==null);return a.length===0?null:a.every(l=>typeof l=="number")?a.reduce((l,y)=>l+y,0):a.every(l=>typeof l=="string")?a.join(""):a.every(l=>Array.isArray(l))?a.flat():a.every(l=>l&&typeof l=="object"&&!Array.isArray(l))?je(...a):null};if(t.length>=1){let h=s(e,t[0],r);return[c(h)]}return Array.isArray(e)?[c(e)]:[null]}case"any":{if(t.length>=2){try{let c=o(e,t[0],r);for(let h of c)if(s(h,t[1],r).some(u))return[!0]}catch(c){if(c instanceof i)throw c}return[!1]}return t.length===1?Array.isArray(e)?[e.some(c=>u(s(c,t[0],r)[0]))]:[!1]:Array.isArray(e)?[e.some(u)]:[!1]}case"all":{if(t.length>=2){try{let c=o(e,t[0],r);for(let h of c)if(!s(h,t[1],r).some(u))return[!1]}catch(c){if(c instanceof i)throw c}return[!0]}return t.length===1?Array.isArray(e)?[e.every(c=>u(s(c,t[0],r)[0]))]:[!0]:Array.isArray(e)?[e.every(u)]:[!0]}case"select":return t.length===0?[e]:s(e,t[0],r).some(u)?[e]:[];case"map":{if(t.length===0||!Array.isArray(e))return[null];z(r,0,e.length);let c=[];for(let h of e){let a=s(h,t[0],r);z(r,c.length,a.length);for(let l of a)c.push(l)}return[c]}case"map_values":{if(t.length===0)return[null];if(Array.isArray(e)){z(r,0,e.length);let c=[];for(let h of e){let a=s(h,t[0],r);z(r,c.length,a.length);for(let l of a)c.push(l)}return[c]}if(e&&typeof e=="object"){let c=Object.create(null),h=Object.keys(e);z(r,0,h.length);for(let a of h){if(!E(a))continue;let l=e[a],y=s(l,t[0],r);y.length>0&&k(c,a,y[0])}return[c]}return[null]}case"has":{if(t.length===0)return[!1];let h=s(e,t[0],r)[0];return Array.isArray(e)&&typeof h=="number"?[h>=0&&h<e.length]:e&&typeof e=="object"&&typeof h=="string"?[Object.hasOwn(e,h)]:[!1]}case"in":{if(t.length===0)return[!1];let h=s(e,t[0],r)[0];return Array.isArray(h)&&typeof e=="number"?[e>=0&&e<h.length]:h&&typeof h=="object"&&typeof e=="string"?[Object.hasOwn(h,e)]:[!1]}case"contains":{if(t.length===0)return[!1];let c=s(e,t[0],r);return[f(e,c[0])]}case"inside":{if(t.length===0)return[!1];let c=s(e,t[0],r);return[f(c[0],e)]}default:return null}}function pe(e,n,t,r,s,o,p,u){switch(n){case"first":if(t.length>0)try{let f=o(e,t[0],r);return f.length>0?[f[0]]:[]}catch(f){if(f instanceof u)throw f;return[]}return Array.isArray(e)&&e.length>0?[e[0]]:[null];case"last":if(t.length>0){let f=s(e,t[0],r);return f.length>0?[f[f.length-1]]:[]}return Array.isArray(e)&&e.length>0?[e[e.length-1]]:[null];case"nth":{if(t.length<1)return[null];let f=s(e,t[0],r);if(t.length>1){for(let c of f)if(c<0)throw new Error("nth doesn't support negative indices");let i;try{i=o(e,t[1],r)}catch(c){if(c instanceof u)throw c;i=[]}return f.flatMap(c=>{let h=c;return h<i.length?[i[h]]:[]})}return Array.isArray(e)?f.flatMap(i=>{let c=i;if(c<0)throw new Error("nth doesn't support negative indices");return c<e.length?[e[c]]:[null]}):[null]}case"range":{if(t.length===0)return[];let f=r.limits.maxArrayElements,i=(y,m)=>{if(y.length>=f)throw new u(`query result element limit exceeded (${f})`,"array_elements");y.push(m)},c=s(e,t[0],r);if(t.length===1){let y=[];for(let m of c){let b=m;for(let A=0;A<b;A++)i(y,A)}return y}let h=s(e,t[1],r);if(t.length===2){let y=[];for(let m of c)for(let b of h){let A=m,w=b;for(let N=A;N<w;N++)i(y,N)}return y}let a=s(e,t[2],r),l=[];for(let y of c)for(let m of h)for(let b of a){let A=y,w=m,N=b;if(N!==0)if(N>0)for(let O=A;O<w;O+=N)i(l,O);else for(let O=A;O>w;O+=N)i(l,O)}return l}case"limit":return t.length<2?[]:s(e,t[0],r).flatMap(i=>{let c=i;if(c<0)throw new Error("limit doesn't support negative count");if(c===0)return[];let h;try{h=o(e,t[1],r)}catch(a){if(a instanceof u)throw a;h=[]}return h.slice(0,c)});case"isempty":{if(t.length<1)return[!0];try{return[o(e,t[0],r).length===0]}catch(f){if(f instanceof u)throw f;return[!0]}}case"isvalid":{if(t.length<1)return[!0];try{return[s(e,t[0],r).length>0]}catch(f){if(f instanceof u)throw f;return[!1]}}case"skip":return t.length<2?[]:s(e,t[0],r).flatMap(i=>{let c=i;if(c<0)throw new Error("skip doesn't support negative count");return s(e,t[1],r).slice(c)});case"until":{if(t.length<2)return[e];let f=e,i=r.limits.maxIterations;for(let c=0;c<i;c++){if(s(f,t[0],r).some(p))return[f];let a=s(f,t[1],r);if(a.length===0)return[f];f=a[0]}throw new u(`jq until: too many iterations (${i}), increase executionLimits.maxJqIterations`,"iterations")}case"while":{if(t.length<2)return[e];let f=[],i=e,c=r.limits.maxIterations;for(let h=0;h<c&&s(i,t[0],r).some(p);h++){f.push(i);let l=s(i,t[1],r);if(l.length===0)break;i=l[0]}if(f.length>=c)throw new u(`jq while: too many iterations (${c}), increase executionLimits.maxJqIterations`,"iterations");return f}case"repeat":{if(t.length===0)return[e];let f=[],i=e,c=r.limits.maxIterations;for(let h=0;h<c;h++){f.push(i);let a=s(i,t[0],r);if(a.length===0)break;i=a[0]}if(f.length>=c)throw new u(`jq repeat: too many iterations (${c}), increase executionLimits.maxJqIterations`,"iterations");return f}default:return null}}var Pe="%Y-%m-%dT%H:%M:%SZ";function ae(e,n){if(!Number.isFinite(e)||Math.abs(e)>864e10)throw new Error(`${n} timestamp is outside the supported range`);return new Date(e*1e3)}function $e(e){let n=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(!n)return null;let[,t,r,s,o,p,u]=n.map(Number),f=Date.UTC(t,r-1,s,o,p,u);if(!Number.isFinite(f))return null;let i=new Date(f);return i.getUTCFullYear()!==t||i.getUTCMonth()!==r-1||i.getUTCDate()!==s||i.getUTCHours()!==o||i.getUTCMinutes()!==p||i.getUTCSeconds()!==u?null:i}function le(e,n,t,r,s){switch(n){case"now":return[Date.now()/1e3];case"gmtime":{if(typeof e!="number")return[null];let o=ae(e,"gmtime"),p=o.getUTCFullYear(),u=o.getUTCMonth(),f=o.getUTCDate(),i=o.getUTCHours(),c=o.getUTCMinutes(),h=o.getUTCSeconds(),a=o.getUTCDay(),l=Date.UTC(p,0,1),y=Math.floor((o.getTime()-l)/(1440*60*1e3));return[[p,u,f,i,c,h,a,y]]}case"mktime":{if(!Array.isArray(e))throw new Error("mktime requires parsed datetime inputs");let[o,p,u,f=0,i=0,c=0]=e;if(typeof o!="number"||typeof p!="number")throw new Error("mktime requires parsed datetime inputs");let h=Date.UTC(o,p,u??1,f??0,i??0,c??0);return[Math.floor(h/1e3)]}case"strftime":{if(t.length===0)return[null];let p=s(e,t[0],r)[0];if(typeof p!="string")throw new Error("strftime/1 requires a string format");let u;if(typeof e=="number")u=ae(e,"strftime");else if(Array.isArray(e)){let[a,l,y,m=0,b=0,A=0]=e;if(typeof a!="number"||typeof l!="number")throw new Error("strftime/1 requires parsed datetime inputs");u=new Date(Date.UTC(a,l,y??1,m??0,b??0,A??0))}else throw new Error("strftime/1 requires parsed datetime inputs");let f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["January","February","March","April","May","June","July","August","September","October","November","December"],c=(a,l=2)=>String(a).padStart(l,"0");return[p.replace(/%Y/g,String(u.getUTCFullYear())).replace(/%m/g,c(u.getUTCMonth()+1)).replace(/%d/g,c(u.getUTCDate())).replace(/%H/g,c(u.getUTCHours())).replace(/%M/g,c(u.getUTCMinutes())).replace(/%S/g,c(u.getUTCSeconds())).replace(/%A/g,f[u.getUTCDay()]).replace(/%B/g,i[u.getUTCMonth()]).replace(/%Z/g,"UTC").replace(/%%/g,"%")]}case"strptime":{if(t.length===0)return[null];if(typeof e!="string")throw new Error("strptime/1 requires a string input");let p=s(e,t[0],r)[0];if(typeof p!="string")throw new Error("strptime/1 requires a string format");if(p!==Pe)throw new Error(`strptime format is not supported: ${p}`);let u=$e(e);if(u){let f=u.getUTCFullYear(),i=u.getUTCMonth(),c=u.getUTCDate(),h=u.getUTCHours(),a=u.getUTCMinutes(),l=u.getUTCSeconds(),y=u.getUTCDay(),m=Date.UTC(f,0,1),b=Math.floor((u.getTime()-m)/(1440*60*1e3));return[[f,i,c,h,a,l,y,b]]}throw new Error(`Cannot parse date: ${e}`)}case"fromdate":{if(typeof e!="string")throw new Error("fromdate requires a string input");let o=$e(e);if(!o)throw new Error(`date "${e}" does not match format "${Pe}"`);return[Math.floor(o.getTime()/1e3)]}case"todate":{if(typeof e!="number")throw new Error("todate requires a number input");return[ae(e,"todate").toISOString().replace(/\.\d{3}Z$/,"Z")]}default:return null}}var Xe=2e3;function Ge(e){let n=[];for(let r=0;r<e.length;r+=32768){let s=Math.min(r+32768,e.length),o="";for(let p=r;p<s;p++)o+=String.fromCharCode(e[p]);n.push(o)}return n.join("")}function Ze(e){let n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}function ye(e,n,t){switch(n){case"@base64":if(typeof e=="string"){if(typeof Buffer<"u")return[Buffer.from(e,"utf-8").toString("base64")];let r=new TextEncoder().encode(e);return[btoa(Ge(r))]}return[null];case"@base64d":if(typeof e=="string"){if(typeof Buffer<"u")return[Buffer.from(e,"base64").toString("utf-8")];let r=Ze(atob(e));return[new TextDecoder("utf-8",{fatal:!1}).decode(r)]}return[null];case"@uri":return typeof e=="string"?[encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")]:[null];case"@urid":return typeof e=="string"?[decodeURIComponent(e)]:[null];case"@csv":return Array.isArray(e)?[e.map(s=>{if(s===null)return"";if(typeof s=="boolean")return s?"true":"false";if(typeof s=="number")return String(s);let o=String(s);return o.includes(",")||o.includes('"')||o.includes(`
3
+ `)||o.includes("\r")?`"${o.replace(/"/g,'""')}"`:o}).join(",")]:[null];case"@tsv":return Array.isArray(e)?[e.map(r=>String(r??"").replace(/\t/g,"\\t").replace(/\n/g,"\\n")).join(" ")]:[null];case"@json":{let r=t??Xe;return B(e,r+1)>r?[null]:[JSON.stringify(e)]}case"@html":return typeof e=="string"?[e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;")]:[null];case"@sh":return typeof e=="string"?[`'${e.replace(/'/g,"'\\''")}'`]:[null];case"@text":return typeof e=="string"?[e]:e==null?[""]:[String(e)];default:return null}}function me(e,n,t,r,s,o){switch(n){case"index":return t.length===0?[null]:s(e,t[0],r).map(u=>{if(typeof e=="string"&&typeof u=="string"){if(u===""&&e==="")return null;let f=e.indexOf(u);return f>=0?f:null}if(Array.isArray(e)){if(Array.isArray(u)){for(let i=0;i<=e.length-u.length;i++){let c=!0;for(let h=0;h<u.length;h++)if(!o(e[i+h],u[h])){c=!1;break}if(c)return i}return null}let f=e.findIndex(i=>o(i,u));return f>=0?f:null}return null});case"rindex":return t.length===0?[null]:s(e,t[0],r).map(u=>{if(typeof e=="string"&&typeof u=="string"){let f=e.lastIndexOf(u);return f>=0?f:null}if(Array.isArray(e)){if(Array.isArray(u)){for(let f=e.length-u.length;f>=0;f--){let i=!0;for(let c=0;c<u.length;c++)if(!o(e[f+c],u[c])){i=!1;break}if(i)return f}return null}for(let f=e.length-1;f>=0;f--)if(o(e[f],u))return f;return null}return null});case"indices":return t.length===0?[[]]:s(e,t[0],r).map(u=>{let f=[];if(typeof e=="string"&&typeof u=="string"){let i=e.indexOf(u);for(;i!==-1;)f.push(i),i=e.indexOf(u,i+1)}else if(Array.isArray(e))if(Array.isArray(u)){let i=u.length;if(i===0)for(let c=0;c<=e.length;c++)f.push(c);else for(let c=0;c<=e.length-i;c++){let h=!0;for(let a=0;a<i;a++)if(!o(e[c+a],u[a])){h=!1;break}h&&f.push(c)}}else for(let i=0;i<e.length;i++)o(e[i],u)&&f.push(i);return f});default:return null}}function de(e,n,t,r,s){switch(n){case"fabs":case"abs":return typeof e=="number"?[Math.abs(e)]:typeof e=="string"?[e]:[null];case"exp10":return typeof e=="number"?[10**e]:[null];case"exp2":return typeof e=="number"?[2**e]:[null];case"pow":{if(t.length<2)return[null];let o=s(e,t[0],r),p=s(e,t[1],r),u=o[0],f=p[0];return typeof u!="number"||typeof f!="number"?[null]:[u**f]}case"atan2":{if(t.length<2)return[null];let o=s(e,t[0],r),p=s(e,t[1],r),u=o[0],f=p[0];return typeof u!="number"||typeof f!="number"?[null]:[Math.atan2(u,f)]}case"hypot":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.hypot(e,o)]}case"fma":{if(typeof e!="number"||t.length<2)return[null];let o=s(e,t[0],r)[0],p=s(e,t[1],r)[0];return[e*o+p]}case"copysign":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.sign(o)*Math.abs(e)]}case"drem":case"remainder":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[e-Math.round(e/o)*o]}case"fdim":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.max(0,e-o)]}case"fmax":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.max(e,o)]}case"fmin":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[Math.min(e,o)]}case"ldexp":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[e*2**o]}case"scalbn":case"scalbln":{if(typeof e!="number"||t.length===0)return[null];let o=s(e,t[0],r)[0];return[e*2**o]}case"nearbyint":return typeof e=="number"?[Math.round(e)]:[null];case"logb":return typeof e=="number"?[Math.floor(Math.log2(Math.abs(e)))]:[null];case"significand":if(typeof e=="number"){let o=Math.floor(Math.log2(Math.abs(e)));return[e/2**o]}return[null];case"frexp":if(typeof e=="number"){if(e===0)return[[0,0]];let o=Math.floor(Math.log2(Math.abs(e)))+1;return[[e/2**o,o]]}return[null];case"modf":if(typeof e=="number"){let o=Math.trunc(e);return[[e-o,o]]}return[null];default:return null}}function V(e){let n=e.limits.maxIterations;return{maxDepth:e.limits.maxDepth,maxResults:e.limits.maxArrayElements,maxIterations:n}}function H(e){throw new g(e,"array_elements")}function ge(e,n){let t=1;for(let r of e){if(!Number.isSafeInteger(r)||r<0)throw new Error("combinations requires finite array lengths");r!==0&&t>Math.floor(n/r)&&H(`query combination limit exceeded (${n})`),t*=r}return t}function be(e,n,t,r,s,o,p,u){switch(n){case"recurse":{let f=[],i=V(r),c=t.length>=2?t[1]:null,h=[{value:e,depth:0}],a=0;for(;h.length>0;){let l=h.pop();if(!l)break;if(++a>i.maxIterations)throw new g(`query iteration limit exceeded (${i.maxIterations})`,"iterations");if(l.depth>i.maxDepth)throw new g(`query depth limit exceeded (${i.maxDepth})`,"recursion");if(c&&!s(l.value,c,r).some(o))continue;f.length>=i.maxResults&&H(`query result element limit exceeded (${i.maxResults})`),f.push(l.value);let y=[];t.length===0?Array.isArray(l.value)?y=l.value:l.value&&typeof l.value=="object"&&(y=Object.keys(l.value).map(m=>l.value[m])):y=s(l.value,t[0],r).filter(m=>m!=null),h.length>i.maxResults-y.length&&H(`query traversal queue limit exceeded (${i.maxResults})`);for(let m=y.length-1;m>=0;m--)h.push({value:y[m],depth:l.depth+1})}return f}case"recurse_down":return u(e,"recurse",t,r);case"walk":{if(t.length===0)return[e];let f=V(r),i=new WeakSet,c=new WeakMap,h=[{value:e,depth:0,expanded:!1}],a=e,l=0;for(;h.length>0;){let y=h.pop();if(!y)break;if(++l>f.maxIterations)throw new g(`query iteration limit exceeded (${f.maxIterations})`,"iterations");if(y.depth>f.maxDepth)throw new g(`query depth limit exceeded (${f.maxDepth})`,"recursion");let m=y.value!==null&&typeof y.value=="object"?y.value:null;if(!y.expanded&&m){if(i.has(m))continue;i.add(m),h.push({...y,expanded:!0});let w=S(y.value),N=Array.isArray(y.value)?y.value:Object.keys(w??{}).map(O=>w?.[O]);h.length>f.maxResults-N.length&&H(`query traversal queue limit exceeded (${f.maxResults})`);for(let O=N.length-1;O>=0;O--)h.push({value:N[O],depth:y.depth+1,expanded:!1});continue}let b=y.value;if(Array.isArray(y.value))b=y.value.map(w=>w!==null&&typeof w=="object"?c.get(w)??w:w);else if(m){let w=Object.create(null),N=S(y.value);for(let O of Object.keys(N??{})){if(!E(O))continue;let $=N?.[O];k(w,O,$!==null&&typeof $=="object"?c.get($)??$:$)}b=w}let A=s(b,t[0],r)[0];m&&c.set(m,A),y.depth===0&&(a=A)}return[a]}case"transpose":{if(!Array.isArray(e))return[null];if(e.length===0)return[[]];let f=V(r),i=0;for(let h of e)Array.isArray(h)&&(i=Math.max(i,h.length));ge([e.length,i],f.maxResults);let c=[];for(let h=0;h<i;h++)c.push(e.map(a=>Array.isArray(a)?a[h]:null));return[c]}case"combinations":{if(t.length>0){let y=s(e,t[0],r)[0];if(!Array.isArray(e))return[];if(!Number.isFinite(y)||!Number.isSafeInteger(y)||y<0)throw new Error("combinations length must be a finite non-negative integer");let m=V(r);if(y>m.maxDepth||y>m.maxResults)throw new g(`query depth limit exceeded (${m.maxDepth})`,"recursion");if(y===0)return m.maxResults<1&&H("query combination limit exceeded (0)"),[[]];let b=ge(Array.from({length:y},()=>e.length),m.maxResults);if(b===0)return[];let A=[],w=new Array(y).fill(0);for(let N=0;N<b;N++){A.push(w.map(O=>e[O]));for(let O=y-1;O>=0&&(w[O]++,!(w[O]<e.length));O--)w[O]=0}return A}if(!Array.isArray(e))return[];if(e.length===0)return V(r).maxResults<1&&H("query combination limit exceeded (0)"),[[]];for(let l of e)if(!Array.isArray(l))return[];let f=V(r),i=e;if(i.length>f.maxDepth)throw new g(`query depth limit exceeded (${f.maxDepth})`,"recursion");let c=ge(i.map(l=>l.length),f.maxResults);if(c===0)return[];let h=[],a=new Array(i.length).fill(0);for(let l=0;l<c;l++){h.push(a.map((y,m)=>i[m][y]));for(let y=i.length-1;y>=0&&(a[y]++,!(a[y]<i[y].length));y--)a[y]=0}return h}case"parent":{if(r.root===void 0||r.currentPath===void 0)return[];let f=r.currentPath;if(f.length===0)return[];let i=t.length>0?s(e,t[0],r)[0]:1;if(i>=0){if(i>f.length)return[];let c=f.slice(0,f.length-i);return[p(r.root,c)]}else{let c=-i-1;if(c>=f.length)return[e];let h=f.slice(0,c);return[p(r.root,h)]}}case"parents":{if(r.root===void 0||r.currentPath===void 0)return[[]];let f=r.currentPath,i=[];for(let c=f.length-1;c>=0;c--)i.push(p(r.root,f.slice(0,c)));return[i]}case"root":return r.root!==void 0?[r.root]:[];default:return null}}var we=2e3;function T(e){return e.limits.maxArrayElements}function Ae(e,n){let t=Object.create(null);return k(t,"key",e),k(t,"value",n),t}function ee(e,n){let t=T(e);if(n>=t)throw new g(`query result element limit exceeded (${t})`,"array_elements")}function ve(e,n){let t=n.limits.maxDepth??we;if(e.length>t)throw new g(`query depth limit exceeded (${t})`,"recursion");let r=n.limits.maxArrayElements;for(let s of e)if(typeof s=="number"){if(!Number.isSafeInteger(s)||s<0||s>=r)throw new g(`query array index limit exceeded (${r})`,"array_elements")}else if(typeof s!="string")throw new Error("stream path components must be strings or integers")}function Ee(e,n,t,r,s){switch(n){case"keys":return Array.isArray(e)?[e.map((o,p)=>p)]:e&&typeof e=="object"?[Object.keys(e).sort()]:[null];case"keys_unsorted":return Array.isArray(e)?[e.map((o,p)=>p)]:e&&typeof e=="object"?[Object.keys(e)]:[null];case"length":return typeof e=="string"?[e.length]:Array.isArray(e)?[e.length]:e&&typeof e=="object"?[Object.keys(e).length]:e===null?[0]:typeof e=="number"?[Math.abs(e)]:[null];case"utf8bytelength":{if(typeof e=="string")return[j(e)];let o=e===null?"null":Array.isArray(e)?"array":typeof e,p=o==="array"||o==="object"?JSON.stringify(e):String(e);throw new Error(`${o} (${p}) only strings have UTF-8 byte length`)}case"to_entries":{if(Array.isArray(e)){if(e.length>T(r))throw new g(`query result element limit exceeded (${T(r)})`,"array_elements");return[e.map((p,u)=>Ae(u,p))]}let o=S(e);if(o){let p=Object.keys(o);if(p.length>T(r))throw new g(`query result element limit exceeded (${T(r)})`,"array_elements");return[p.map(u=>Ae(u,o[u]))]}return[null]}case"from_entries":if(Array.isArray(e)){let o=Object.create(null);for(let p of e){let u=S(p);if(u){let f=u.key??u.Key??u.name??u.Name??u.k,i=u.value??u.Value??u.v;if(f!==void 0){let c=String(f);E(c)&&k(o,c,i)}}}return[o]}return[null];case"with_entries":{if(t.length===0)return[e];let o=S(e);if(o){let p=Object.keys(o);if(p.length>T(r))throw new g(`query result element limit exceeded (${T(r)})`,"array_elements");let u=[];for(let i of p){let c=Ae(i,o[i]),h=s(c,t[0],r);if(u.length>T(r)-h.length)throw new g(`query result element limit exceeded (${T(r)})`,"array_elements");for(let a of h)u.push(a)}let f=Object.create(null);for(let i of u){let c=S(i);if(c){let h=c.key??c.name??c.k,a=c.value??c.v;if(h!==void 0){let l=String(h);E(l)&&k(f,l,a)}}}return[f]}return[null]}case"reverse":return Array.isArray(e)?[[...e].reverse()]:typeof e=="string"?[e.split("").reverse().join("")]:[null];case"flatten":return Array.isArray(e)?(t.length>0?s(e,t[0],r):[Number.POSITIVE_INFINITY]).map(p=>{let u=p;if(u<0)throw new Error("flatten depth must not be negative");return e.flat(u)}):[null];case"unique":if(Array.isArray(e)){let o=new Set,p=[];for(let u of e){let f=JSON.stringify(u);o.has(f)||(o.add(f),p.push(u))}return[p]}return[null];case"tojson":case"tojsonstream":{let o=r.limits.maxDepth??we;return B(e,o+1)>o?[null]:[JSON.stringify(e)]}case"fromjson":{if(typeof e=="string"){let o=e.trim().toLowerCase();if(o==="nan")return[Number.NaN];if(o==="inf"||o==="infinity")return[Number.POSITIVE_INFINITY];if(o==="-inf"||o==="-infinity")return[Number.NEGATIVE_INFINITY];try{return[Ie(JSON.parse(e),{maxDepth:r.limits.maxDepth,maxElements:r.limits.maxArrayElements})]}catch(p){throw p instanceof g?p:new Error(`Invalid JSON: ${e}`)}}return[e]}case"tostring":return typeof e=="string"?[e]:[JSON.stringify(e)];case"tonumber":if(typeof e=="number")return[e];if(typeof e=="string"){let o=e.trim()===""?Number.NaN:Number(e);if(Number.isNaN(o))throw new Error(`${JSON.stringify(e)} cannot be parsed as a number`);return[o]}throw new Error(`${typeof e} cannot be parsed as a number`);case"toboolean":{if(typeof e=="boolean")return[e];if(typeof e=="string"){if(e==="true")return[!0];if(e==="false")return[!1];throw new Error(`string (${JSON.stringify(e)}) cannot be parsed as a boolean`)}let o=e===null?"null":Array.isArray(e)?"array":typeof e,p=o==="array"||o==="object"?JSON.stringify(e):String(e);throw new Error(`${o} (${p}) cannot be parsed as a boolean`)}case"tostream":{let o=[],p=r.limits.maxDepth??we,u=[{value:e,path:[]}],f=new WeakSet,i=0;for(;u.length>0;){let c=u.pop();if(!c)break;if(++i>r.limits.maxIterations)throw new g(`query iteration limit exceeded (${r.limits.maxIterations})`,"iterations");if(c.path.length>p)throw new g(`query depth limit exceeded (${p})`,"recursion");let h=c.value;if(h===null||typeof h!="object")ee(r,o.length),o.push([c.path,h]);else if(Array.isArray(h)){if(f.has(h))throw new g("cyclic value cannot be converted to a stream","recursion");if(f.add(h),h.length===0)ee(r,o.length),o.push([c.path,[]]);else{if(u.length>T(r)-h.length)throw new g(`query traversal queue limit exceeded (${T(r)})`,"array_elements");for(let a=h.length-1;a>=0;a--)u.push({value:h[a],path:[...c.path,a]})}}else{if(f.has(h))throw new g("cyclic value cannot be converted to a stream","recursion");f.add(h);let a=Object.keys(h);if(a.length===0)ee(r,o.length),o.push([c.path,Object.create(null)]);else{if(u.length>T(r)-a.length)throw new g(`query traversal queue limit exceeded (${T(r)})`,"array_elements");for(let l=a.length-1;l>=0;l--){let y=a[l];u.push({value:h[y],path:[...c.path,y]})}}}}return ee(r,o.length),o.push([[]]),o}case"fromstream":{if(t.length===0)return[e];let o=s(e,t[0],r);if(o.length>T(r))throw new g(`query stream item limit exceeded (${T(r)})`,"array_elements");let p=null,u=0;for(let f of o){if(!Array.isArray(f)||f.length===1&&Array.isArray(f[0])&&f[0].length===0||f.length!==2)continue;let[i,c]=f;if(!Array.isArray(i))continue;if(ve(i,r),i.length===0){p=c;continue}p===null&&(p=typeof i[0]=="number"?[]:Object.create(null));let h=p;for(let l=0;l<i.length-1;l++){let y=i[l],m=i[l+1];if(Array.isArray(h)&&typeof y=="number"){let b=y+1-h.length;if(b>r.limits.maxIterations-u)throw new g(`query iteration limit exceeded (${r.limits.maxIterations})`,"iterations");for(u+=Math.max(0,b);h.length<=y;)h.push(null);h[y]===null&&(h[y]=typeof m=="number"?[]:Object.create(null)),h=h[y]}else{let b=S(h);if(b){let A=String(y);if(!E(A))continue;(b[A]===null||b[A]===void 0)&&k(b,A,typeof m=="number"?[]:Object.create(null)),h=b[A]}}}let a=i[i.length-1];if(Array.isArray(h)&&typeof a=="number"){let l=a+1-h.length;if(l>r.limits.maxIterations-u)throw new g(`query iteration limit exceeded (${r.limits.maxIterations})`,"iterations");for(u+=Math.max(0,l);h.length<=a;)h.push(null);h[a]=c}else{let l=S(h);if(l){let y=String(a);E(y)&&k(l,y,c)}}}return[p]}case"truncate_stream":{let o=typeof e=="number"?Math.floor(e):0;if(t.length===0)return[];let p=[],u=s(e,t[0],r);for(let f of u)if(Array.isArray(f)){if(f.length===1&&Array.isArray(f[0])){let i=f[0];i.length>o&&p.push([i.slice(o)]);continue}if(f.length===2&&Array.isArray(f[0])){let i=f[0],c=f[1];i.length>o&&p.push([i.slice(o),c])}}return p}default:return null}}function Le(e,n){if(!Array.isArray(e))throw new Error("path must be an array");let t=n.limits.maxDepth;if(e.length>t)throw new g(`query depth limit exceeded (${t})`,"recursion");let r=n.limits.maxArrayElements,s=0;for(let o of e)if(typeof o=="number"){if(!Number.isSafeInteger(o)||o<0||o>=r)throw new g(`query array index limit exceeded (${r})`,"array_elements");let p=o+1;if(s>r-p)throw new g(`query cumulative array allocation limit exceeded (${r})`,"array_elements");s+=p}else if(typeof o!="string")throw new Error("path components must be strings or integers");return R(n,s+e.length),e}function _e(e,n,t){let r=[],s=[{value:e,path:[],isRoot:!0}];for(;s.length>0;){let o=s.pop();if(!o)break;if(R(n),o.path.length>n.limits.maxDepth)throw new g(`query depth limit exceeded (${n.limits.maxDepth})`,"recursion");if(!(o.value!==null&&typeof o.value=="object")){(t||!o.isRoot)&&(D(n,r.length),r.push(o.path));continue}!t&&!o.isRoot&&(D(n,r.length),r.push(o.path));let u=Array.isArray(o.value)?o.value.map((f,i)=>[i,f]):Object.keys(o.value).map(f=>[f,o.value[f]]);D(n,r.length,s.length+u.length);for(let f=u.length-1;f>=0;f--){let[i,c]=u[f],h=[...o.path,i];s.push({value:c,path:h,isRoot:!1})}}return r}function ke(e,n,t,r,s,o,p,u,f,i){switch(n){case"getpath":{if(t.length===0)return[null];let c=s(e,t[0],r),h=[];for(let a of c){let l=a,y=e;for(let m of l){if(y==null){y=null;break}if(Array.isArray(y)&&typeof m=="number")y=y[m];else if(typeof m=="string"){let b=S(y);if(!b||!Object.hasOwn(b,m)){y=null;break}y=b[m]}else{y=null;break}}h.push(y)}return h}case"setpath":{if(t.length<2)return[null];let c=s(e,t[0],r),h=Le(c[0],r),l=s(e,t[1],r)[0];return[p(e,h,l)]}case"delpaths":{if(t.length===0)return[e];let h=s(e,t[0],r)[0],a=e;for(let l of h.sort((y,m)=>m.length-y.length))a=u(a,l);return[a]}case"path":{if(t.length===0)return[[]];let c=[];return i(e,t[0],r,[],c),c}case"del":return t.length===0?[e]:[f(e,t[0],r)];case"pick":{if(t.length===0)return[null];let c=[];for(let a of t)i(e,a,r,[],c);let h=null;for(let a of c){for(let y of a)if(typeof y=="number"&&y<0)throw new Error("Out of bounds negative array index");Le(a,r);let l=e;for(let y of a){if(l==null)break;if(Array.isArray(l)&&typeof y=="number")l=l[y];else if(typeof y=="string"){let m=S(l);if(!m||!Object.hasOwn(m,y)){l=null;break}l=m[y]}else{l=null;break}}h=p(h,a,l)}return[h]}case"paths":{let c=_e(e,r,!1);return t.length>0?c.filter(h=>{let a=e;for(let y of h)if(Array.isArray(a)&&typeof y=="number")a=a[y];else if(typeof y=="string"){let m=S(a);if(!m||!Object.hasOwn(m,y))return!1;a=m[y]}else return!1;return s(a,t[0],r).some(o)}):c}case"leaf_paths":return _e(e,r,!0);default:return null}}function Se(e,n,t,r,s,o){switch(n){case"IN":{if(t.length===0)return[!1];if(t.length===1){let i=s(e,t[0],r);for(let c of i)if(o(e,c))return[!0];return[!1]}let p=s(e,t[0],r),u=s(e,t[1],r),f=new Set(u.map(i=>JSON.stringify(i)));for(let i of p)if(f.has(JSON.stringify(i)))return[!0];return[!1]}case"INDEX":{if(t.length===0)return[Object.create(null)];if(t.length===1){let f=s(e,t[0],r),i=Object.create(null);for(let c of f){let h=String(c);E(h)&&k(i,h,c)}return[i]}if(t.length===2){let f=s(e,t[0],r),i=Object.create(null);for(let c of f){let h=s(c,t[1],r);if(h.length>0){let a=String(h[0]);E(a)&&k(i,a,c)}}return[i]}let p=s(e,t[0],r),u=Object.create(null);for(let f of p){let i=s(f,t[1],r),c=s(f,t[2],r);if(i.length>0&&c.length>0){let h=String(i[0]);E(h)&&k(u,h,c[0])}}return[u]}case"JOIN":{if(t.length<2)return[null];let p=S(s(e,t[0],r)[0]);if(!p)return[null];if(!Array.isArray(e))return[null];let u=[];for(let f of e){let i=s(f,t[1],r),c=i.length>0?String(i[0]):"",h=_(p,c)?p[c]:null;u.push([f,h])}return[u]}default:return null}}function Ue(e){return e.limits.maxArrayElements}function Be(e){return Math.min(e.limits.maxStringLength,e.limits.maxOutputSize)}function U(e,n){let t=Ue(e);if(!Number.isSafeInteger(n)||n<0||n>t)throw new g(`query result element limit exceeded (${t})`,"array_elements")}function et(e,n,t){if(e==="")return n===""?0:1;if(n==="")return e.length;let r=1,s=0;for(;;){let o=e.indexOf(n,s);if(o<0||(r++,r>t))return r;s=o+n.length}}function Oe(e,n,t,r,s){switch(n){case"join":{if(!Array.isArray(e))return[null];let o=t.length>0?s(e,t[0],r):[""];for(let p of e)if(Array.isArray(p)||p!==null&&typeof p=="object")throw new Error("cannot join: contains arrays or objects");return U(r,o.length),o.map(p=>{let u=String(p),f=0;for(let i=0;i<e.length;i++){let c=e[i]===null?"":typeof e[i]=="string"?e[i]:String(e[i]);if(f+=j(c),i>0&&(f+=j(u)),f>Be(r))throw new g(`query string size limit exceeded (${Be(r)} bytes)`,"string_length")}return e.map(i=>i===null?"":typeof i=="string"?i:String(i)).join(u)})}case"split":{if(typeof e!="string"||t.length===0)return[null];let o=s(e,t[0],r),p=String(o[0]);return U(r,et(e,p,Ue(r))),[e.split(p)]}case"splits":{if(typeof e!="string"||t.length===0)return[];let o=s(e,t[0],r),p=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"g",f=P(p,u.includes("g")?u:`${u}g`),i=1;for(let h of f.matchAll(e))i+=Math.max(1,h.length),U(r,i);let c=f.split(e);return U(r,c.length),c}catch(u){if(u instanceof g)throw u;return[]}}case"scan":{if(typeof e!="string"||t.length===0)return[];let o=s(e,t[0],r),p=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"",f=P(p,u.includes("g")?u:`${u}g`),i=[];for(let c of f.matchAll(e))U(r,i.length+1),c.length>1?(U(r,c.length-1),i.push(c.slice(1))):i.push(c[0]);return i}catch(u){if(u instanceof g)throw u;return[]}}case"test":{if(typeof e!="string"||t.length===0)return[!1];let o=s(e,t[0],r),p=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"";return[P(p,u).test(e)]}catch{return[!1]}}case"match":{if(typeof e!="string"||t.length===0)return[null];let o=s(e,t[0],r),p=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"",i=P(p,`${u}d`).exec(e);if(!i)return[];let c=i.indices;return[{offset:i.index,length:i[0].length,string:i[0],captures:i.slice(1).map((h,a)=>({offset:c?.[a+1]?.[0]??null,length:h?.length??0,string:h??"",name:null}))}]}catch{return[null]}}case"capture":{if(typeof e!="string"||t.length===0)return[null];let o=s(e,t[0],r),p=String(o[0]);try{let u=t.length>1?String(s(e,t[1],r)[0]):"",i=P(p,u).match(e);return!i||!i.groups?[Object.create(null)]:[i.groups]}catch{return[null]}}case"sub":{if(typeof e!="string"||t.length<2)return[null];let o=s(e,t[0],r),p=s(e,t[1],r),u=String(o[0]),f=String(p[0]);try{let i=t.length>2?String(s(e,t[2],r)[0]):"";return[P(u,i).replace(e,f)]}catch{return[e]}}case"gsub":{if(typeof e!="string"||t.length<2)return[null];let o=s(e,t[0],r),p=s(e,t[1],r),u=String(o[0]),f=String(p[0]);try{let i=t.length>2?String(s(e,t[2],r)[0]):"g",c=i.includes("g")?i:`${i}g`;return[P(u,c).replace(e,f)]}catch{return[e]}}case"ascii_downcase":return typeof e=="string"?[e.replace(/[A-Z]/g,o=>String.fromCharCode(o.charCodeAt(0)+32))]:[null];case"ascii_upcase":return typeof e=="string"?[e.replace(/[a-z]/g,o=>String.fromCharCode(o.charCodeAt(0)-32))]:[null];case"ltrimstr":{if(typeof e!="string"||t.length===0)return[e];let o=s(e,t[0],r),p=String(o[0]);return[e.startsWith(p)?e.slice(p.length):e]}case"rtrimstr":{if(typeof e!="string"||t.length===0)return[e];let o=s(e,t[0],r),p=String(o[0]);return p===""?[e]:[e.endsWith(p)?e.slice(0,-p.length):e]}case"trimstr":{if(typeof e!="string"||t.length===0)return[e];let o=s(e,t[0],r),p=String(o[0]);if(p==="")return[e];let u=e;return u.startsWith(p)&&(u=u.slice(p.length)),u.endsWith(p)&&(u=u.slice(0,-p.length)),[u]}case"trim":if(typeof e=="string")return[e.trim()];throw new Error("trim input must be a string");case"ltrim":if(typeof e=="string")return[e.trimStart()];throw new Error("trim input must be a string");case"rtrim":if(typeof e=="string")return[e.trimEnd()];throw new Error("trim input must be a string");case"startswith":{if(typeof e!="string"||t.length===0)return[!1];let o=s(e,t[0],r);return[e.startsWith(String(o[0]))]}case"endswith":{if(typeof e!="string"||t.length===0)return[!1];let o=s(e,t[0],r);return[e.endsWith(String(o[0]))]}case"ascii":return typeof e=="string"&&e.length>0?[e.charCodeAt(0)]:[null];case"explode":if(typeof e=="string"){let o=0;for(let p of e)o++,U(r,o);return[Array.from(e).map(p=>p.codePointAt(0))]}return[null];case"implode":if(!Array.isArray(e))throw new Error("implode input must be an array");return[e.map(u=>{if(typeof u=="string")throw new Error(`string (${JSON.stringify(u)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof u!="number"||Number.isNaN(u))throw new Error("number (null) can't be imploded, unicode codepoint needs to be numeric");let f=Math.trunc(u);return f<0||f>1114111||f>=55296&&f<=57343?String.fromCodePoint(65533):String.fromCodePoint(f)}).join("")];default:return null}}function Ne(e,n){switch(n){case"type":return e===null?["null"]:Array.isArray(e)?["array"]:typeof e=="boolean"?["boolean"]:typeof e=="number"?["number"]:typeof e=="string"?["string"]:typeof e=="object"?["object"]:["null"];case"infinite":return[Number.POSITIVE_INFINITY];case"nan":return[Number.NaN];case"isinfinite":return[typeof e=="number"&&!Number.isFinite(e)];case"isnan":return[typeof e=="number"&&Number.isNaN(e)];case"isnormal":return[typeof e=="number"&&Number.isFinite(e)&&e!==0];case"isfinite":return[typeof e=="number"&&Number.isFinite(e)];case"numbers":return typeof e=="number"?[e]:[];case"strings":return typeof e=="string"?[e]:[];case"booleans":return typeof e=="boolean"?[e]:[];case"nulls":return e===null?[e]:[];case"arrays":return Array.isArray(e)?[e]:[];case"objects":return e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"iterables":return Array.isArray(e)||e&&typeof e=="object"&&!Array.isArray(e)?[e]:[];case"scalars":return!Array.isArray(e)&&!(e&&typeof e=="object")?[e]:[];case"values":return e===null?[]:[e];case"not":return e===!1||e===null?[!0]:[!1];case"null":return[null];case"true":return[!0];case"false":return[!1];case"empty":return[];default:return null}}function te(e,n,t){if(n.length===0)return t;let[r,...s]=n;if(typeof r=="number"){if(e&&typeof e=="object"&&!Array.isArray(e))throw new Error("Cannot index object with number");if(r>536870911)throw new Error("Array index too large");if(r<0)throw new Error("Out of bounds negative array index");let i=Array.isArray(e)?[...e]:[];for(;i.length<=r;)i.push(null);return i[r]=te(i[r],s,t),i}if(Array.isArray(e))throw new Error("Cannot index array with string");if(!E(r))return e??Object.create(null);let o=S(e),p=o?C(o):Object.create(null),u=Object.hasOwn(p,r)?p[r]:void 0;return k(p,r,te(u,s,t)),p}function re(e,n){if(n.length===0)return null;if(n.length===1){let s=n[0];if(Array.isArray(e)&&typeof s=="number"){let o=[...e];return o.splice(s,1),o}if(e&&typeof e=="object"&&!Array.isArray(e)){let o=String(s);if(!E(o))return e;let p=C(e);return delete p[o],p}return e}let[t,...r]=n;if(Array.isArray(e)&&typeof t=="number"){let s=[...e];return s[t]=re(s[t],r),s}if(e&&typeof e=="object"&&!Array.isArray(e)){let s=String(t);if(!E(s))return e;let o=C(e);return Object.hasOwn(o,s)&&k(o,s,re(o[s],r)),o}return e}var Q=class e extends Error{label;partialResults;constructor(n,t=[]){super(`break ${n}`),this.label=n,this.partialResults=t,this.name="BreakError"}withPrependedResults(n){return new e(this.label,[...n,...this.partialResults])}},ie=class extends Error{value;constructor(n){super(typeof n=="string"?n:JSON.stringify(n)),this.value=n,this.name="JqError"}},tt=1e4,qe=10*1024*1024,Je=2e3,rt=new Map([["floor",Math.floor],["ceil",Math.ceil],["round",Math.round],["sqrt",Math.sqrt],["log",Math.log],["log10",Math.log10],["log2",Math.log2],["exp",Math.exp],["sin",Math.sin],["cos",Math.cos],["tan",Math.tan],["asin",Math.asin],["acos",Math.acos],["atan",Math.atan],["sinh",Math.sinh],["cosh",Math.cosh],["tanh",Math.tanh],["asinh",Math.asinh],["acosh",Math.acosh],["atanh",Math.atanh],["cbrt",Math.cbrt],["expm1",Math.expm1],["log1p",Math.log1p],["trunc",Math.trunc]]);function F(e,n){return new g(e,n)}function R(e,n=1){if(!Number.isSafeInteger(n)||n<0||e.budget.operations>e.limits.maxIterations-n)throw F(`query evaluation: too many iterations (${e.limits.maxIterations})`,"iterations");e.budget.operations+=n}function D(e,n,t=1){let r=e.limits.maxArrayElements;if(!Number.isSafeInteger(n)||!Number.isSafeInteger(t)||n<0||t<0||n>r-t)throw F(`query result element limit exceeded (${r})`,"array_elements")}function q(e,n,t){D(e,n.length,t.length);for(let r of t)n.push(r)}function M(e,n,t){let r=[];for(let s of n){R(e);let o=t(s);q(e,r,o)}return r}function nt(e){let n=new Map;if(e?.namedArgs)for(let[t,r]of e.namedArgs)n.set(`$${t}`,r);return{vars:n,limits:{maxIterations:e?.limits?.maxIterations??tt,maxDepth:e?.limits?.maxDepth??Je,maxStringLength:e?.limits?.maxStringLength??qe,maxOutputSize:e?.limits?.maxOutputSize??qe,maxArrayElements:e?.limits?.maxArrayElements??1e5},env:e?.env,namedArgs:e?.namedArgs,positionalArgs:e?.positionalArgs,coverage:e?.coverage,requireDefenseContext:e?.requireDefenseContext,defenseContextChecked:!1,budget:e?.budget??{operations:0,callDepth:0}}}function se(e,n,t){let r=new Map(e.vars);return r.set(n,t),{vars:r,limits:e.limits,env:e.env,namedArgs:e.namedArgs,positionalArgs:e.positionalArgs,requireDefenseContext:e.requireDefenseContext,defenseContextChecked:e.defenseContextChecked,root:e.root,currentPath:e.currentPath,funcs:e.funcs,labels:e.labels,coverage:e.coverage,budget:e.budget}}function W(e,n,t){switch(n.type){case"var":return se(e,n.name,t);case"array":{if(!Array.isArray(t))return null;let r=e;for(let s=0;s<n.elements.length;s++){let o=n.elements[s],p=s<t.length?t[s]:null,u=W(r,o,p);if(u===null)return null;r=u}return r}case"object":{let r=S(t);if(!r)return null;let s=e;for(let o of n.fields){let p;if(typeof o.key=="string")p=o.key;else{let i=d(t,o.key,e);if(i.length===0)return null;p=String(i[0])}let u=_(r,p)?r[p]:null;o.keyVar&&(s=se(s,o.keyVar,u));let f=W(s,o.pattern,u);if(f===null)return null;s=f}return s}}}function it(e,n){let t=e;for(let r of n)if(t&&typeof t=="object")if(Array.isArray(t))if(typeof r=="number")t=t[r];else return;else{let s=S(t);if(s&&typeof r=="string"&&Object.hasOwn(s,r))t=s[r];else return}else return;return t}function x(e){if(e.type==="Identity")return[];if(e.type==="Field"){let n=e.base?x(e.base):[];return n===null?null:[...n,e.name]}if(e.type==="Index"&&e.index.type==="Literal"){let n=e.base?x(e.base):[];if(n===null)return null;let t=e.index.value;return typeof t=="number"||typeof t=="string"?[...n,t]:null}if(e.type==="Pipe"){let n=x(e.left);return n===null?null:Ce(n,e.right)}if(e.type==="Call"){if(e.name==="parent"||e.name==="root")return null;if(e.name==="first"&&e.args.length===0)return[0];if(e.name==="last"&&e.args.length===0)return[-1]}return null}function Ce(e,n){if(n.type==="Call"){if(n.name==="parent"){let t=1;if(n.args.length>0&&n.args[0].type==="Literal"){let r=n.args[0].value;typeof r=="number"&&(t=r)}if(t>=0)return e.slice(0,Math.max(0,e.length-t));{let r=-t-1;return e.slice(0,Math.min(r,e.length))}}if(n.name==="root")return[]}if(n.type==="Field"){let t=x(n);if(t!==null)return[...e,...t]}if(n.type==="Index"&&n.index.type==="Literal"){let t=x(n);if(t!==null)return[...e,...t]}if(n.type==="Pipe"){let t=Ce(e,n.left);return t===null?null:Ce(t,n.right)}return n.type==="Identity"?e:null}function Fe(e,n,t){if(n.type==="Comma"){let r=[];try{let s=d(e,n.left,t);q(t,r,s)}catch(s){if(s instanceof g)throw s;if(r.length>0)return r;throw new Error("evaluation failed")}try{let s=d(e,n.right,t);q(t,r,s)}catch(s){if(s instanceof g)throw s;return r}return r}return d(e,n,t)}function d(e,n,t){let r=t&&"vars"in t?t:nt(t);if(r.defenseContextChecked||(Me(r.requireDefenseContext,"query-engine","evaluation"),r={...r,defenseContextChecked:!0}),r.root===void 0&&(r={...r,root:e,currentPath:[]}),R(r),r.budget.callDepth++,r.budget.callDepth>r.limits.maxDepth)throw r.budget.callDepth--,F(`query depth limit exceeded (${r.limits.maxDepth})`,"recursion");try{let s=st(e,n,r);return D(r,0,s.length),s}finally{r.budget.callDepth--}}function st(e,n,t){switch(t.coverage?.hit(`jq:node:${n.type}`),n.type){case"Identity":return[e];case"Field":{let r=n.base?d(e,n.base,t):[e];return M(t,r,s=>{let o=S(s);if(o){if(!Object.hasOwn(o,n.name))return[null];let u=o[n.name];return[u===void 0?null:u]}if(s===null)return[null];let p=Array.isArray(s)?"array":typeof s;throw new Error(`Cannot index ${p} with string "${n.name}"`)})}case"Index":{let r=d(e,n.index,t);if(r.length===0)return[];let s=n.base?d(e,n.base,t):[e];return M(t,r,o=>M(t,s,p=>{if(typeof o=="number"&&Array.isArray(p)){if(Number.isNaN(o))return[null];let u=Math.trunc(o),f=u<0?p.length+u:u;return f>=0&&f<p.length?[p[f]]:[null]}if(typeof o=="string"){let u=S(p);return!u||!Object.hasOwn(u,o)?[null]:[u[o]]}return[null]}))}case"Slice":{let r=n.base?d(e,n.base,t):[e];return M(t,r,s=>{if(s===null)return[null];if(!Array.isArray(s)&&typeof s!="string")throw new Error(`Cannot slice ${typeof s} (${JSON.stringify(s)})`);let o=s.length,p=n.start?d(e,n.start,t):[0],u=n.end?d(e,n.end,t):[o];return D(t,0,p.length*u.length),M(t,p,f=>u.map(i=>{let c=f,h=i,a=Number.isNaN(c)?0:Number.isInteger(c)?c:Math.floor(c),l=Number.isNaN(h)?o:Number.isInteger(h)?h:Math.ceil(h),y=Ke(a,o),m=Ke(l,o);return Array.isArray(s),s.slice(y,m)}))})}case"Iterate":{let r=n.base?d(e,n.base,t):[e];return M(t,r,s=>Array.isArray(s)?s:s&&typeof s=="object"?Object.values(s):[])}case"Pipe":{let r=d(e,n.left,t),s=x(n.left),o=[];for(let p of r)try{if(s!==null){let u={...t,currentPath:[...t.currentPath??[],...s]},f=d(p,n.right,u);q(t,o,f)}else{let u=d(p,n.right,t);q(t,o,u)}}catch(u){throw u instanceof Q?u.withPrependedResults(o):u}return o}case"Comma":{let r=d(e,n.left,t),s=d(e,n.right,t);return D(t,r.length,s.length),[...r,...s]}case"Literal":return[n.value];case"Array":return n.elements?[d(e,n.elements,t)]:[[]];case"Object":{let r=[Object.create(null)];for(let s of n.entries){let o=typeof s.key=="string"?[s.key]:d(e,s.key,t),p=d(e,s.value,t),u=[],f=o.filter(h=>typeof h=="string"&&E(h)).length,i=f+(o.length-f),c=r.length*i*p.length;D(t,0,c);for(let h of r)for(let a of o){if(typeof a!="string"){let l=a===null?"null":Array.isArray(a)?"array":typeof a;throw new Error(`Cannot use ${l} (${JSON.stringify(a)}) as object key`)}if(!E(a)){for(let l of p)u.push(C(h));continue}for(let l of p){let y=C(h);k(y,a,l),u.push(y)}}r.length=0,q(t,r,u)}return r}case"Paren":return d(e,n.expr,t);case"BinaryOp":return ft(e,n.op,n.left,n.right,t);case"UnaryOp":return d(e,n.operand,t).map(s=>{if(n.op==="-"){if(typeof s=="number")return-s;if(typeof s=="string"){let o=p=>p.length>5?`"${p.slice(0,3)}...`:JSON.stringify(p);throw new Error(`string (${o(s)}) cannot be negated`)}return null}return n.op==="not"?!I(s):null});case"Cond":{let r=d(e,n.cond,t);return M(t,r,s=>{if(I(s))return d(e,n.then,t);for(let o of n.elifs)if(d(e,o.cond,t).some(I))return d(e,o.then,t);return n.else?d(e,n.else,t):[e]})}case"Try":try{return d(e,n.body,t)}catch(r){if(r instanceof g)throw r;if(n.catch){let s=r instanceof ie?r.value:r instanceof Error?r.message:String(r);return d(s,n.catch,t)}return[]}case"Call":return He(e,n.name,n.args,t);case"VarBind":{let r=d(e,n.value,t);return M(t,r,s=>{let o=null,p=[];if(n.pattern?p.push(n.pattern):n.name&&p.push({type:"var",name:n.name}),n.alternatives)for(let u of n.alternatives)p.push(u);for(let u of p)if(o=W(t,u,s),o!==null)break;return o===null?[]:d(e,n.body,o)})}case"VarRef":{if(n.name==="$ENV")return[t.env?ue(t.env):Object.create(null)];if(n.name==="$ARGS"){let s=Object.create(null);if(t.namedArgs)for(let[p,u]of t.namedArgs)Object.defineProperty(s,p,{value:u,enumerable:!0,writable:!0,configurable:!0});let o=Object.create(null);return o.positional=t.positionalArgs?[...t.positionalArgs]:[],o.named=s,[o]}let r=t.vars.get(n.name);return r!==void 0?[r]:[null]}case"Recurse":{let r=[],s=new WeakSet,o=[{val:e,depth:0}];for(;o.length>0;){let p=o.pop();if(!p)break;let{val:u,depth:f}=p;if(R(t),f>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");if(u&&typeof u=="object"){if(s.has(u))continue;s.add(u)}if(D(t,r.length),r.push(u),Array.isArray(u))for(let i=u.length-1;i>=0;i--)o.push({val:u[i],depth:f+1});else if(u&&typeof u=="object"){let i=Object.keys(u);for(let c=i.length-1;c>=0;c--)o.push({val:u[i[c]],depth:f+1})}}return r}case"Optional":try{return d(e,n.expr,t)}catch(r){if(r instanceof g)throw r;return[]}case"StringInterp":{let r=new G(t.limits.maxStringLength,"query string interpolation",()=>new g(`string size limit exceeded (${t.limits.maxStringLength} bytes)`,"string_length"));for(let s of n.parts){if(typeof s=="string"){r.append(s);continue}let o=d(e,s,t);for(let p of o){if(R(t),B(p,t.limits.maxDepth+1)>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");r.append(typeof p=="string"?p:JSON.stringify(p))}}return[r.build()]}case"UpdateOp":return[ot(e,n.path,n.op,n.value,t)];case"Reduce":{let r=d(e,n.expr,t),s=d(e,n.init,t)[0],o=t.limits.maxDepth??Je;for(let p of r){let u;if(n.pattern){if(u=W(t,n.pattern,p),u===null)continue}else u=se(t,n.varName,p);if(s=d(s,n.update,u)[0],B(s,o+1)>o)return[null]}return[s]}case"Foreach":{let r=d(e,n.expr,t),s=d(e,n.init,t)[0],o=[];for(let p of r)try{let u;if(n.pattern){if(u=W(t,n.pattern,p),u===null)continue}else u=se(t,n.varName,p);if(s=d(s,n.update,u)[0],n.extract){let f=d(s,n.extract,u);q(t,o,f)}else D(t,o.length),o.push(s)}catch(u){throw u instanceof Q?u.withPrependedResults(o):u}return o}case"Label":try{return d(e,n.body,{...t,labels:new Set([...t.labels??[],n.name])})}catch(r){if(r instanceof Q&&r.label===n.name)return r.partialResults;throw r}case"Break":throw new Q(n.name);case"Def":{let r=new Map(t.funcs??[]),s=`${n.name}/${n.params.length}`;r.set(s,{params:n.params,body:n.funcBody,closure:new Map(t.funcs??[])});let o={...t,funcs:r};return d(e,n.body,o)}default:{let r=n;throw new Error(`Unknown AST node type: ${r.type}`)}}}function Ke(e,n){return e<0?Math.max(0,n+e):Math.min(e,n)}function ot(e,n,t,r,s){function o(f,i){switch(t){case"=":return i;case"|=":return d(f,r,s)[0]??null;case"+=":return typeof f=="number"&&typeof i=="number"||typeof f=="string"&&typeof i=="string"?f+i:Array.isArray(f)&&Array.isArray(i)?(D(s,f.length,i.length),[...f,...i]):f&&i&&typeof f=="object"&&typeof i=="object"?ce(f,i):i;case"-=":return typeof f=="number"&&typeof i=="number"?f-i:f;case"*=":return typeof f=="number"&&typeof i=="number"?f*i:f;case"/=":return typeof f=="number"&&typeof i=="number"?f/i:f;case"%=":return typeof f=="number"&&typeof i=="number"?f%i:f;case"//=":return f===null||f===!1?i:f;default:return i}}function p(f,i,c){switch(i.type){case"Identity":return c(f);case"Field":{if(!E(i.name))return f;if(i.base)return p(f,i.base,h=>{if(h&&typeof h=="object"&&!Array.isArray(h)){let a=C(h),l=Object.hasOwn(a,i.name)?a[i.name]:void 0;return k(a,i.name,c(l)),a}return h});if(f&&typeof f=="object"&&!Array.isArray(f)){let h=C(f),a=Object.hasOwn(h,i.name)?h[i.name]:void 0;return k(h,i.name,c(a)),h}return f}case"Index":{let a=d(e,i.index,s)[0];if(typeof a=="number"&&Number.isNaN(a))throw new Error("Cannot set array element at NaN index");if(typeof a=="number"&&!Number.isFinite(a))throw new Error("array index must be finite");if(typeof a=="number"&&!Number.isInteger(a)&&(a=Math.trunc(a)),i.base)return p(f,i.base,l=>{if(typeof a=="number"&&Array.isArray(l)){let y=[...l],m=a<0?y.length+a:a;if(m>=0){D(s,0,m+1),y.length<=m&&(y.length=m+1);for(let b=l.length;b<m;b++)y[b]=null;y[m]=c(y[m])}return y}if(typeof a=="string"&&l&&typeof l=="object"&&!Array.isArray(l)){if(!E(a))return l;let y=C(l),m=Object.hasOwn(y,a)?y[a]:void 0;return k(y,a,c(m)),y}return l});if(typeof a=="number"){if(!Number.isSafeInteger(a)||a>536870911)throw new Error("Array index too large");if(a<0&&(!f||!Array.isArray(f)))throw new Error("Out of bounds negative array index");if(Array.isArray(f)){let y=[...f],m=a<0?y.length+a:a;if(m>=0){D(s,0,m+1),y.length<=m&&(y.length=m+1);for(let b=f.length;b<m;b++)y[b]=null;y[m]=c(y[m])}return y}if(f==null){D(s,0,a+1);let y=new Array(a+1).fill(null);return y[a]=c(null),y}return f}if(typeof a=="string"&&f&&typeof f=="object"&&!Array.isArray(f)){if(!E(a))return f;let l=C(f),y=Object.hasOwn(l,a)?l[a]:void 0;return k(l,a,c(y)),l}return f}case"Iterate":{let h=a=>{if(Array.isArray(a)){D(s,0,a.length);let l=[];for(let y of a)R(s),l.push(c(y));return l}if(a&&typeof a=="object"){let l=Object.create(null);for(let[y,m]of Object.entries(a))E(y)&&k(l,y,c(m));return l}return a};return i.base?p(f,i.base,h):h(f)}case"Pipe":{let h=p(f,i.left,a=>a);return p(h,i.right,c)}default:return c(f)}}return p(e,n,f=>{if(t==="|=")return o(f,f);let i=d(e,r,s);return o(f,i[0]??null)})}function Ve(e,n,t){function r(o,p,u){switch(p.type){case"Identity":return u;case"Field":{if(!E(p.name))return o;if(p.base){let f=d(o,p.base,t)[0],i=r(f,{type:"Field",name:p.name},u);return r(o,p.base,i)}if(o&&typeof o=="object"&&!Array.isArray(o)){let f=C(o);return k(f,p.name,u),f}return o}case"Index":{if(p.base){let c=d(o,p.base,t)[0],h=r(c,{type:"Index",index:p.index},u);return r(o,p.base,h)}let i=d(e,p.index,t)[0];if(typeof i=="number"&&Array.isArray(o)){let c=[...o],h=i<0?c.length+i:i;return h>=0&&h<c.length&&(c[h]=u),c}if(typeof i=="string"&&o&&typeof o=="object"&&!Array.isArray(o)){if(!E(i))return o;let c=C(o);return k(c,i,u),c}return o}default:return o}}function s(o,p){switch(p.type){case"Identity":return null;case"Field":{if(!E(p.name))return o;if(p.base){let f=d(o,p.base,t)[0];if(f==null)return o;let i=s(f,{type:"Field",name:p.name});return r(o,p.base,i)}if(o&&typeof o=="object"&&!Array.isArray(o)){if(!E(p.name))return o;let f=C(o);return delete f[p.name],f}return o}case"Index":{if(p.base){let c=d(o,p.base,t)[0];if(c==null)return o;let h=s(c,{type:"Index",index:p.index});return r(o,p.base,h)}let i=d(e,p.index,t)[0];if(typeof i=="number"&&Array.isArray(o)){let c=[...o],h=i<0?c.length+i:i;return h>=0&&h<c.length&&c.splice(h,1),c}if(typeof i=="string"&&o&&typeof o=="object"&&!Array.isArray(o)){if(!E(i))return o;let c=C(o);return delete c[i],c}return o}case"Iterate":return Array.isArray(o)?[]:o&&typeof o=="object"?Object.create(null):o;case"Pipe":{let c=function(l,y,m){switch(y.type){case"Identity":return m;case"Field":{if(!E(y.name))return l;if(l&&typeof l=="object"&&!Array.isArray(l)){let b=C(l);return k(b,y.name,m),b}return l}case"Index":{let A=d(e,y.index,t)[0];if(typeof A=="number"&&Array.isArray(l)){let w=[...l],N=A<0?w.length+A:A;return N>=0&&N<w.length&&(w[N]=m),w}if(typeof A=="string"&&l&&typeof l=="object"&&!Array.isArray(l)){if(!E(A))return l;let w=C(l);return k(w,A,m),w}return l}case"Pipe":{let b=d(l,y.left,t)[0],A=c(b,y.right,m);return c(l,y.left,A)}default:return l}};var u=c;let f=p.left,i=p.right,h=d(o,f,t)[0];if(h==null)return o;let a=Ve(h,i,t);return c(o,f,a)}default:return o}}return s(e,n)}function ft(e,n,t,r,s){if(n==="and"){let f=d(e,t,s);return M(s,f,i=>{if(!I(i))return[!1];let c=d(e,r,s);return M(s,c,h=>[I(h)])})}if(n==="or"){let f=d(e,t,s);return M(s,f,i=>{if(I(i))return[!0];let c=d(e,r,s);return M(s,c,h=>[I(h)])})}if(n==="//"){let i=d(e,t,s).filter(c=>c!=null&&c!==!1);return i.length>0?i:d(e,r,s)}let o=d(e,t,s),p=d(e,r,s),u=o.length*p.length;return D(s,0,u),R(s,u),o.flatMap(f=>p.map(i=>{switch(n){case"+":if(f===null)return i;if(i===null)return f;if(typeof f=="number"&&typeof i=="number")return f+i;if(typeof f=="string"&&typeof i=="string"){let c=s.limits.maxStringLength;if(j(f)+j(i)>c)throw new g(`string size limit exceeded (${c} bytes)`,"string_length");return f+i}return Array.isArray(f)&&Array.isArray(i)?(D(s,f.length,i.length),[...f,...i]):f&&i&&typeof f=="object"&&typeof i=="object"&&!Array.isArray(f)&&!Array.isArray(i)?ce(f,i):null;case"-":if(typeof f=="number"&&typeof i=="number")return f-i;if(Array.isArray(f)&&Array.isArray(i)){let c=new Set(i.map(h=>JSON.stringify(h)));return f.filter(h=>!c.has(JSON.stringify(h)))}if(typeof f=="string"&&typeof i=="string"){let c=h=>h.length>10?`"${h.slice(0,10)}...`:JSON.stringify(h);throw new Error(`string (${c(f)}) and string (${c(i)}) cannot be subtracted`)}return null;case"*":if(typeof f=="number"&&typeof i=="number")return f*i;if(typeof f=="string"&&typeof i=="number"){if(!Number.isFinite(i))throw new Error(`invalid string repetition count: ${i}`);let c=Math.trunc(i);if(c<0)return null;let h=j(f),a=s.limits.maxStringLength;if(h>0&&c>Math.floor(a/h))throw new g(`string size limit exceeded (${a} bytes)`,"string_length");return f.repeat(c)}{let c=S(f),h=S(i);if(c&&h)return xe(c,h,{maxDepth:s.limits.maxDepth,visit:()=>R(s)})}return null;case"/":if(typeof f=="number"&&typeof i=="number"){if(i===0)throw new Error(`number (${f}) and number (${i}) cannot be divided because the divisor is zero`);return f/i}return typeof f=="string"&&typeof i=="string"?f.split(i):null;case"%":if(typeof f=="number"&&typeof i=="number"){if(i===0)throw new Error(`number (${f}) and number (${i}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(f)&&!Number.isNaN(f)?!Number.isFinite(i)&&!Number.isNaN(i)&&f<0&&i>0?-1:0:f%i}return null;case"==":return J(f,i);case"!=":return!J(f,i);case"<":return Y(f,i)<0;case"<=":return Y(f,i)<=0;case">":return Y(f,i)>0;case">=":return Y(f,i)>=0;default:return null}}))}function He(e,n,t,r){let s=rt.get(n);if(s)return typeof e=="number"?[s(e)]:[null];let o=de(e,n,t,r,d);if(o!==null)return o;let p=Oe(e,n,t,r,d);if(p!==null)return p;let u=le(e,n,t,r,d);if(u!==null)return u;let f=ye(e,n,r.limits.maxDepth);if(f!==null)return f;let i=Ne(e,n);if(i!==null)return i;let c=Ee(e,n,t,r,d);if(c!==null)return c;let h=he(e,n,t,r,d,Fe,Z,I,v,g);if(h!==null)return h;let a=ke(e,n,t,r,d,I,te,re,Ve,ne);if(a!==null)return a;let l=me(e,n,t,r,d,J);if(l!==null)return l;let y=pe(e,n,t,r,d,Fe,I,g);if(y!==null)return y;let m=be(e,n,t,r,d,I,it,He);if(m!==null)return m;let b=Se(e,n,t,r,d,J);if(b!==null)return b;switch(n){case"builtins":return[["add/0","all/0","all/1","all/2","any/0","any/1","any/2","arrays/0","ascii/0","ascii_downcase/0","ascii_upcase/0","booleans/0","bsearch/1","builtins/0","combinations/0","combinations/1","contains/1","debug/0","del/1","delpaths/1","empty/0","env/0","error/0","error/1","explode/0","first/0","first/1","flatten/0","flatten/1","floor/0","from_entries/0","fromdate/0","fromjson/0","getpath/1","gmtime/0","group_by/1","gsub/2","gsub/3","has/1","implode/0","IN/1","IN/2","INDEX/1","INDEX/2","index/1","indices/1","infinite/0","inside/1","isempty/1","isnan/0","isnormal/0","isvalid/1","iterables/0","join/1","keys/0","keys_unsorted/0","last/0","last/1","length/0","limit/2","ltrimstr/1","map/1","map_values/1","match/1","match/2","max/0","max_by/1","min/0","min_by/1","mktime/0","modulemeta/1","nan/0","not/0","nth/1","nth/2","null/0","nulls/0","numbers/0","objects/0","path/1","paths/0","paths/1","pick/1","range/1","range/2","range/3","recurse/0","recurse/1","recurse_down/0","repeat/1","reverse/0","rindex/1","rtrimstr/1","scalars/0","scan/1","scan/2","select/1","setpath/2","skip/2","sort/0","sort_by/1","split/1","splits/1","splits/2","sqrt/0","startswith/1","strftime/1","strings/0","strptime/1","sub/2","sub/3","test/1","test/2","to_entries/0","toboolean/0","todate/0","tojson/0","tostream/0","fromstream/1","truncate_stream/1","tonumber/0","tostring/0","transpose/0","trim/0","ltrim/0","rtrim/0","type/0","unique/0","unique_by/1","until/2","utf8bytelength/0","values/0","walk/1","while/2","with_entries/1"]];case"error":{let A=t.length>0?d(e,t[0],r)[0]:e;throw new ie(A)}case"env":return[r.env?ue(r.env):Object.create(null)];case"debug":return[e];case"input_line_number":return[1];default:{let A=`${n}/${t.length}`,w=r.funcs?.get(A);if(w){let N=w.closure??r.funcs??new Map,O=new Map(N);O.set(A,w);for(let X=0;X<w.params.length;X++){let We=w.params[X],Te=t[X];if(Te){let L=d(e,Te,r),K;if(L.length===0)K={type:"Call",name:"empty",args:[]};else if(L.length===1)K={type:"Literal",value:L[0]};else{K={type:"Literal",value:L[L.length-1]};for(let fe=L.length-2;fe>=0;fe--)K={type:"Comma",left:{type:"Literal",value:L[fe]},right:K}}O.set(`${We}/0`,{params:[],body:K})}}let $={...r,funcs:O};return d(e,w.body,$)}throw new Error(`Unknown function: ${n}`)}}}function ne(e,n,t,r,s){if(R(t),r.length>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");let o=(f,i)=>{let c=r.length+f.length+(i===void 0?0:1);if(c>t.limits.maxDepth)throw F(`query depth limit exceeded (${t.limits.maxDepth})`,"recursion");D(t,s.length),R(t,c);let h=[...r,...f];i!==void 0&&h.push(i),s.push(h)};if(n.type==="Comma"){let f=n;ne(e,f.left,t,r,s),ne(e,f.right,t,r,s);return}let p=x(n);if(p!==null){o(p);return}if(n.type==="Index"){let f=n.base?x(n.base):[],i=f?d(e,n.index,t):[];if(f&&i.every(c=>typeof c=="string"||typeof c=="number")){if(i.length===0)return;let c=n.base?d(e,n.base,t):[e];for(let h of i)for(let a of c){if(R(t),a!==null&&(typeof h=="string"?typeof a!="object"||Array.isArray(a):!Array.isArray(a))){let l=Array.isArray(a)?"array":typeof a;throw new Error(`Cannot index ${l} with ${typeof h=="string"?`string "${h}"`:"number"}`)}o(f,h)}return}}if(n.type==="Iterate"){if(Array.isArray(e))for(let f=0;f<e.length;f++)R(t),o([],f);else if(e&&typeof e=="object")for(let f of Object.keys(e))R(t),o([],f);return}if(n.type==="Recurse"){let f=[{value:e,path:[]}];for(;f.length>0;){let i=f.pop();if(!i)break;if(R(t),o(i.path),i.value&&typeof i.value=="object"){let c=Array.isArray(i.value)?i.value.map((h,a)=>[a,h]):Object.keys(i.value).map(h=>[h,i.value[h]]);D(t,0,f.length+c.length);for(let h=c.length-1;h>=0;h--){let[a,l]=c[h];f.push({value:l,path:[...i.path,a]})}}}return}if(n.type==="Pipe"){let f=x(n.left);if(f!==null){let i=d(e,n.left,t);for(let c of i)ne(c,n.right,t,[...r,...f],s);return}}d(e,n,t).length>0&&o([])}var Qe=new Map([["and","AND"],["or","OR"],["not","NOT"],["if","IF"],["then","THEN"],["elif","ELIF"],["else","ELSE"],["end","END"],["as","AS"],["try","TRY"],["catch","CATCH"],["true","TRUE"],["false","FALSE"],["null","NULL"],["reduce","REDUCE"],["foreach","FOREACH"],["label","LABEL"],["break","BREAK"],["def","DEF"]]),oe=new Set(Qe.values());function Ye(e){let n=[],t=0,r=(i=0)=>e[t+i],s=()=>e[t++],o=()=>t>=e.length,p=i=>i>="0"&&i<="9",u=i=>i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="_",f=i=>u(i)||p(i);for(;!o();){let i=t,c=s();if(!(c===" "||c===" "||c===`
4
+ `||c==="\r")){if(c==="#"){for(;!o()&&r()!==`
5
+ `;)s();continue}if(c==="."&&r()==="."){s(),n.push({type:"DOTDOT",pos:i});continue}if(c==="="&&r()==="="){s(),n.push({type:"EQ",pos:i});continue}if(c==="!"&&r()==="="){s(),n.push({type:"NE",pos:i});continue}if(c==="<"&&r()==="="){s(),n.push({type:"LE",pos:i});continue}if(c===">"&&r()==="="){s(),n.push({type:"GE",pos:i});continue}if(c==="/"&&r()==="/"){s(),r()==="="?(s(),n.push({type:"UPDATE_ALT",pos:i})):n.push({type:"ALT",pos:i});continue}if(c==="+"&&r()==="="){s(),n.push({type:"UPDATE_ADD",pos:i});continue}if(c==="-"&&r()==="="){s(),n.push({type:"UPDATE_SUB",pos:i});continue}if(c==="*"&&r()==="="){s(),n.push({type:"UPDATE_MUL",pos:i});continue}if(c==="/"&&r()==="="){s(),n.push({type:"UPDATE_DIV",pos:i});continue}if(c==="%"&&r()==="="){s(),n.push({type:"UPDATE_MOD",pos:i});continue}if(c==="="&&r()!=="="){n.push({type:"ASSIGN",pos:i});continue}if(c==="."){n.push({type:"DOT",pos:i});continue}if(c==="|"){r()==="="?(s(),n.push({type:"UPDATE_PIPE",pos:i})):n.push({type:"PIPE",pos:i});continue}if(c===","){n.push({type:"COMMA",pos:i});continue}if(c===":"){n.push({type:"COLON",pos:i});continue}if(c===";"){n.push({type:"SEMICOLON",pos:i});continue}if(c==="("){n.push({type:"LPAREN",pos:i});continue}if(c===")"){n.push({type:"RPAREN",pos:i});continue}if(c==="["){n.push({type:"LBRACKET",pos:i});continue}if(c==="]"){n.push({type:"RBRACKET",pos:i});continue}if(c==="{"){n.push({type:"LBRACE",pos:i});continue}if(c==="}"){n.push({type:"RBRACE",pos:i});continue}if(c==="?"){n.push({type:"QUESTION",pos:i});continue}if(c==="+"){n.push({type:"PLUS",pos:i});continue}if(c==="-"){n.push({type:"MINUS",pos:i});continue}if(c==="*"){n.push({type:"STAR",pos:i});continue}if(c==="/"){n.push({type:"SLASH",pos:i});continue}if(c==="%"){n.push({type:"PERCENT",pos:i});continue}if(c==="<"){n.push({type:"LT",pos:i});continue}if(c===">"){n.push({type:"GT",pos:i});continue}if(p(c)){let h=c;for(;!o()&&(p(r())||r()==="."||r()==="e"||r()==="E");)(r()==="e"||r()==="E")&&(e[t+1]==="+"||e[t+1]==="-")&&(h+=s()),h+=s();n.push({type:"NUMBER",value:Number(h),pos:i});continue}if(c==='"'){let h="",a=0;for(;!o();){let l=r();if(a===0&&l==='"')break;if(a===0&&l==="\\"){if(s(),o())break;let y=s();switch(y){case"n":h+=`
6
+ `;break;case"r":h+="\r";break;case"t":h+=" ";break;case"\\":h+="\\";break;case'"':h+='"';break;case"(":h+="\\(",a=1;break;default:h+=y}continue}if(a>0){if(l==='"'){for(h+=s();!o();){let y=r();if(y==="\\"){h+=s(),o()||(h+=s());continue}if(h+=s(),y==='"')break}continue}l==="("?a++:l===")"&&a--,h+=s();continue}h+=s()}o()||s(),n.push({type:"STRING",value:h,pos:i});continue}if(u(c)||c==="$"||c==="@"){let h=c;for(;!o()&&f(r());)h+=s();let a=Qe.get(h);a?n.push({type:a,value:h,pos:i}):n.push({type:"IDENT",value:h,pos:i});continue}throw new Error(`Unexpected character '${c}' at position ${i}`)}}return n.push({type:"EOF",pos:t}),n}var De=class e{maxDepth;tokens;pos=0;depth;constructor(n,t,r=0){this.maxDepth=t,this.tokens=n,this.depth=r}peek(n=0){return this.tokens[this.pos+n]??{type:"EOF",pos:-1}}advance(){return this.tokens[this.pos++]}check(n){return this.peek().type===n}match(...n){for(let t of n)if(this.check(t))return this.advance();return null}expect(n,t){if(!this.check(n))throw new Error(`${t} at position ${this.peek().pos}, got ${this.peek().type}`);return this.advance()}withDepth(n){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return n()}finally{this.depth--}}isFieldNameAfterDot(n=0){let t=this.peek(n),r=this.peek(n+1);return r.type==="STRING"?!0:r.type==="IDENT"||oe.has(r.type)?r.pos===t.pos+1:!1}isIdentLike(){let n=this.peek().type;return n==="IDENT"||oe.has(n)}consumeFieldNameAfterDot(n){let t=this.peek();return t.type==="STRING"?this.advance().value:(t.type==="IDENT"||oe.has(t.type))&&t.pos===n.pos+1?this.advance().value:null}parse(){let n=this.parseExpr();if(!this.check("EOF"))throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`);return n}parseExpr(){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return this.parsePipe()}finally{this.depth--}}parsePattern(){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return this.parsePatternInner()}finally{this.depth--}}parsePatternInner(){if(this.match("LBRACKET")){let r=[];if(!this.check("RBRACKET"))for(r.push(this.parsePattern());this.match("COMMA")&&!this.check("RBRACKET");)r.push(this.parsePattern());return this.expect("RBRACKET","Expected ']' after array pattern"),{type:"array",elements:r}}if(this.match("LBRACE")){let r=[];if(!this.check("RBRACE"))for(r.push(this.parsePatternField());this.match("COMMA")&&!this.check("RBRACE");)r.push(this.parsePatternField());return this.expect("RBRACE","Expected '}' after object pattern"),{type:"object",fields:r}}let n=this.expect("IDENT","Expected variable name in pattern"),t=n.value;if(!t.startsWith("$"))throw new Error(`Variable name must start with $ at position ${n.pos}`);return{type:"var",name:t}}parsePatternField(){if(this.match("LPAREN")){let t=this.parseExpr();this.expect("RPAREN","Expected ')' after computed key"),this.expect("COLON","Expected ':' after computed key");let r=this.parsePattern();return{key:t,pattern:r}}let n=this.peek();if(n.type==="IDENT"||oe.has(n.type)){let t=n.value;if(t.startsWith("$")){if(this.advance(),this.match("COLON")){let r=this.parsePattern();return{key:t.slice(1),pattern:r,keyVar:t}}return{key:t.slice(1),pattern:{type:"var",name:t}}}if(this.advance(),this.match("COLON")){let r=this.parsePattern();return{key:t,pattern:r}}return{key:t,pattern:{type:"var",name:`$${t}`}}}throw new Error(`Expected field name in object pattern at position ${n.pos}`)}parsePipe(){let n=this.parseComma();for(;this.match("PIPE");){let t=this.parseComma();n={type:"Pipe",left:n,right:t}}return n}parseComma(){let n=this.parseVarBind();for(;this.match("COMMA");){let t=this.parseVarBind();n={type:"Comma",left:n,right:t}}return n}parseVarBind(){let n=this.parseUpdate();if(this.match("AS")){let t=this.parsePattern(),r=[];for(;this.check("QUESTION")&&this.peekAhead(1)?.type==="ALT";)this.advance(),this.advance(),r.push(this.parsePattern());this.expect("PIPE","Expected '|' after variable binding");let s=this.parseExpr();return t.type==="var"&&r.length===0?{type:"VarBind",name:t.name,value:n,body:s}:{type:"VarBind",name:t.type==="var"?t.name:"",value:n,body:s,pattern:t.type!=="var"?t:void 0,alternatives:r.length>0?r:void 0}}return n}peekAhead(n){let t=this.pos+n;return t<this.tokens.length?this.tokens[t]:void 0}parseUpdate(){let n=this.parseAlt(),t=new Map([["ASSIGN","="],["UPDATE_ADD","+="],["UPDATE_SUB","-="],["UPDATE_MUL","*="],["UPDATE_DIV","/="],["UPDATE_MOD","%="],["UPDATE_ALT","//="],["UPDATE_PIPE","|="]]),r=this.match("ASSIGN","UPDATE_ADD","UPDATE_SUB","UPDATE_MUL","UPDATE_DIV","UPDATE_MOD","UPDATE_ALT","UPDATE_PIPE");if(r){let s=this.withDepth(()=>this.parseVarBind()),o=t.get(r.type);if(o)return{type:"UpdateOp",op:o,path:n,value:s}}return n}parseAlt(){let n=this.parseOr();for(;this.match("ALT");){let t=this.parseOr();n={type:"BinaryOp",op:"//",left:n,right:t}}return n}parseOr(){let n=this.parseAnd();for(;this.match("OR");){let t=this.parseAnd();n={type:"BinaryOp",op:"or",left:n,right:t}}return n}parseAnd(){let n=this.parseNot();for(;this.match("AND");){let t=this.parseNot();n={type:"BinaryOp",op:"and",left:n,right:t}}return n}parseNot(){return this.parseComparison()}parseComparison(){let n=this.parseAddSub(),t=new Map([["EQ","=="],["NE","!="],["LT","<"],["LE","<="],["GT",">"],["GE",">="]]),r=this.match("EQ","NE","LT","LE","GT","GE");if(r){let s=t.get(r.type);if(s){let o=this.parseAddSub();n={type:"BinaryOp",op:s,left:n,right:o}}}return n}parseAddSub(){let n=this.parseMulDiv();for(;;)if(this.match("PLUS")){let t=this.parseMulDiv();n={type:"BinaryOp",op:"+",left:n,right:t}}else if(this.match("MINUS")){let t=this.parseMulDiv();n={type:"BinaryOp",op:"-",left:n,right:t}}else break;return n}parseMulDiv(){let n=this.parseUnary();for(;;)if(this.match("STAR")){let t=this.parseUnary();n={type:"BinaryOp",op:"*",left:n,right:t}}else if(this.match("SLASH")){let t=this.parseUnary();n={type:"BinaryOp",op:"/",left:n,right:t}}else if(this.match("PERCENT")){let t=this.parseUnary();n={type:"BinaryOp",op:"%",left:n,right:t}}else break;return n}parseUnary(){let n=0;for(;this.match("MINUS");)if(n++,this.depth+n>this.maxDepth)throw new Error(`query parse depth limit exceeded (${this.maxDepth})`);let t=this.parsePostfix();for(;n-- >0;)t={type:"UnaryOp",op:"-",operand:t};return t}parsePostfix(){let n=this.parsePrimary();for(;;)if(this.match("QUESTION"))n={type:"Optional",expr:n};else if(this.check("DOT")&&this.isFieldNameAfterDot())this.advance(),n={type:"Field",name:this.advance().value,base:n};else if(this.check("LBRACKET"))if(this.advance(),this.match("RBRACKET"))n={type:"Iterate",base:n};else if(this.check("COLON")){this.advance();let t=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),n={type:"Slice",end:t,base:n}}else{let t=this.parseExpr();if(this.match("COLON")){let r=this.check("RBRACKET")?void 0:this.parseExpr();this.expect("RBRACKET","Expected ']'"),n={type:"Slice",start:t,end:r,base:n}}else this.expect("RBRACKET","Expected ']'"),n={type:"Index",index:t,base:n}}else break;return n}parsePrimary(){if(this.match("DOTDOT"))return{type:"Recurse"};if(this.check("DOT")){let n=this.advance();if(this.check("LBRACKET")){if(this.advance(),this.match("RBRACKET"))return{type:"Iterate"};if(this.check("COLON")){this.advance();let s=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",end:s}}let r=this.parseExpr();if(this.match("COLON")){let s=this.check("RBRACKET")?void 0:this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Slice",start:r,end:s}}return this.expect("RBRACKET","Expected ']'"),{type:"Index",index:r}}let t=this.consumeFieldNameAfterDot(n);return t!==null?{type:"Field",name:t}:{type:"Identity"}}if(this.match("TRUE"))return{type:"Literal",value:!0};if(this.match("FALSE"))return{type:"Literal",value:!1};if(this.match("NULL"))return{type:"Literal",value:null};if(this.check("NUMBER"))return{type:"Literal",value:this.advance().value};if(this.check("STRING")){let t=this.advance().value;return t.includes("\\(")?this.parseStringInterpolation(t):{type:"Literal",value:t}}if(this.match("LBRACKET")){if(this.match("RBRACKET"))return{type:"Array"};let n=this.parseExpr();return this.expect("RBRACKET","Expected ']'"),{type:"Array",elements:n}}if(this.match("LBRACE"))return this.parseObjectConstruction();if(this.match("LPAREN")){let n=this.parseExpr();return this.expect("RPAREN","Expected ')'"),{type:"Paren",expr:n}}if(this.match("IF"))return this.parseIf();if(this.match("TRY")){let n=this.withDepth(()=>this.parsePostfix()),t;return this.match("CATCH")&&(t=this.withDepth(()=>this.parsePostfix())),{type:"Try",body:n,catch:t}}if(this.match("REDUCE")){let n=this.parseAddSub();this.expect("AS","Expected 'as' after reduce expression");let t=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let r=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let s=this.parseExpr();this.expect("RPAREN","Expected ')' after update expression");let o=t.type==="var"?t.name:"";return{type:"Reduce",expr:n,varName:o,init:r,update:s,pattern:t.type!=="var"?t:void 0}}if(this.match("FOREACH")){let n=this.parseAddSub();this.expect("AS","Expected 'as' after foreach expression");let t=this.parsePattern();this.expect("LPAREN","Expected '(' after variable");let r=this.parseExpr();this.expect("SEMICOLON","Expected ';' after init expression");let s=this.parseExpr(),o;this.match("SEMICOLON")&&(o=this.parseExpr()),this.expect("RPAREN","Expected ')' after expressions");let p=t.type==="var"?t.name:"";return{type:"Foreach",expr:n,varName:p,init:r,update:s,extract:o,pattern:t.type!=="var"?t:void 0}}if(this.match("LABEL")){let n=this.expect("IDENT","Expected label name (e.g., $out)"),t=n.value;if(!t.startsWith("$"))throw new Error(`Label name must start with $ at position ${n.pos}`);this.expect("PIPE","Expected '|' after label name");let r=this.parseExpr();return{type:"Label",name:t,body:r}}if(this.match("BREAK")){let n=this.expect("IDENT","Expected label name to break to"),t=n.value;if(!t.startsWith("$"))throw new Error(`Break label must start with $ at position ${n.pos}`);return{type:"Break",name:t}}if(this.match("DEF")){let t=this.expect("IDENT","Expected function name after def").value,r=[];if(this.match("LPAREN")){if(!this.check("RPAREN")){let p=this.expect("IDENT","Expected parameter name");for(r.push(p.value);this.match("SEMICOLON");){let u=this.expect("IDENT","Expected parameter name");r.push(u.value)}}this.expect("RPAREN","Expected ')' after parameters")}this.expect("COLON","Expected ':' after function name");let s=this.parseExpr();this.expect("SEMICOLON","Expected ';' after function body");let o=this.parseExpr();return{type:"Def",name:t,params:r,funcBody:s,body:o}}if(this.match("NOT"))return{type:"Call",name:"not",args:[]};if(this.check("IDENT")){let t=this.advance().value;if(t.startsWith("$"))return{type:"VarRef",name:t};if(this.match("LPAREN")){let r=[];if(!this.check("RPAREN"))for(r.push(this.parseExpr());this.match("SEMICOLON");)r.push(this.parseExpr());return this.expect("RPAREN","Expected ')'"),{type:"Call",name:t,args:r}}return{type:"Call",name:t,args:[]}}throw new Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`)}parseObjectConstruction(){if(this.depth++,this.depth>this.maxDepth)throw this.depth--,new Error(`query parse depth limit exceeded (${this.maxDepth})`);try{return this.parseObjectConstructionInner()}finally{this.depth--}}parseObjectConstructionInner(){let n=[];if(!this.check("RBRACE"))do{let t,r;if(this.match("LPAREN"))t=this.parseExpr(),this.expect("RPAREN","Expected ')'"),this.expect("COLON","Expected ':'"),r=this.parseObjectValue();else if(this.isIdentLike()){let s=this.advance().value;this.match("COLON")?(t=s,r=this.parseObjectValue()):(t=s,r={type:"Field",name:s})}else if(this.check("STRING"))t=this.advance().value,this.expect("COLON","Expected ':'"),r=this.parseObjectValue();else throw new Error(`Expected object key at position ${this.peek().pos}`);n.push({key:t,value:r})}while(this.match("COMMA"));return this.expect("RBRACE","Expected '}'"),{type:"Object",entries:n}}parseObjectValue(){let n=this.parseVarBind();for(;this.match("PIPE");){let t=this.parseVarBind();n={type:"Pipe",left:n,right:t}}return n}parseIf(){let n=this.parseExpr();this.expect("THEN","Expected 'then'");let t=this.parseExpr(),r=[];for(;this.match("ELIF");){let o=this.parseExpr();this.expect("THEN","Expected 'then' after elif");let p=this.parseExpr();r.push({cond:o,then:p})}let s;return this.match("ELSE")&&(s=this.parseExpr()),this.expect("END","Expected 'end'"),{type:"Cond",cond:n,then:t,elifs:r,else:s}}parseStringInterpolation(n){let t=[],r="",s=0;for(;s<n.length;)if(n[s]==="\\"&&n[s+1]==="("){r&&(t.push(r),r=""),s+=2;let o=1,p="";for(;s<n.length&&o>0;){let i=n[s];if(i==='"'){for(p+=i,s++;s<n.length;){let c=n[s];if(c==="\\"){p+=c,s++,s<n.length&&(p+=n[s],s++);continue}if(p+=c,s++,c==='"')break}continue}i==="("?o++:i===")"&&o--,o>0&&(p+=i),s++}let u=Ye(p),f=new e(u,this.maxDepth,this.depth);t.push(f.parse())}else r+=n[s],s++;return r&&t.push(r),{type:"StringInterp",parts:t}}};function pr(e,n={}){let t=n.maxDepth??256,r=n.maxTokens??1e5,s=n.maxSourceLength??1048576;if(e.length>s)throw new Error(`query source length limit exceeded (${s} characters)`);if(e.length+1>r)throw new Error(`query token limit exceeded (${r})`);let o=Ye(e);return new De(o,t).parse()}function br(e,n,t={}){let r=new G(n,"query JSON output",()=>new g(`output size limit exceeded (${n} bytes)`,t.limitKind??"output_size"));return Re(r,e,t,0),r.build()}function Re(e,n,t,r){if(n==null){e.append("null");return}if(typeof n=="boolean"){e.append(String(n));return}if(typeof n=="number"){e.append(Number.isFinite(n)?String(n):"null");return}if(typeof n=="string"){t.raw&&r===0?e.append(n):ze(e,n);return}let s=t.compact??!1,o=t.indent??2,p=t.useTab?" ":" ".repeat(o);if(Array.isArray(n)){e.append("[");for(let f=0;f<n.length;f++)e.append(s?f===0?"":",":f===0?`
7
+ `:`,
8
+ `),s||e.repeat(p,r+1),Re(e,n[f],t,r+1);!s&&n.length>0&&e.append(`
9
+ `).repeat(p,r),e.append("]");return}let u=Object.keys(n);t.sortKeys&&(u=u.sort()),e.append("{");for(let f=0;f<u.length;f++){let i=u[f];e.append(s?f===0?"":",":f===0?`
10
+ `:`,
11
+ `),s||e.repeat(p,r+1),ze(e,i),e.append(s?":":": "),Re(e,n[i],t,r+1)}!s&&u.length>0&&e.append(`
12
+ `).repeat(p,r),e.append("}")}function ze(e,n){e.append('"');let t=0;for(let r=0;r<n.length;r++){let s=n.charCodeAt(r),o="";s===34?o='\\"':s===92?o="\\\\":s===8?o="\\b":s===9?o="\\t":s===10?o="\\n":s===12?o="\\f":s===13?o="\\r":s<32&&(o=`\\u${s.toString(16).padStart(4,"0")}`),o&&(e.append(n.slice(t,r)).append(o),t=r+1)}e.append(n.slice(t)).append('"')}export{B as a,d as b,pr as c,br as d};
@@ -0,0 +1,11 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{l as f}from"./chunk-IQGNPH54.js";import{a as u,d as h}from"./chunk-U3UTFNHI.js";import{a as x,b as m,c as g}from"./chunk-QAYAQNCG.js";var w={name:"expand",summary:"convert tabs to spaces",usage:"expand [OPTION]... [FILE]...",description:"Convert TABs in each FILE to spaces, writing to standard output. If no FILE is specified, standard input is read.",options:["-t N Use N spaces per tab (default: 8)","-t LIST Use comma-separated list of tab stops","-i Only convert leading tabs on each line"],examples:["expand file.txt # Convert all tabs to 8 spaces","expand -t 4 file.txt # Use 4-space tabs","expand -t 4,8,12 file.txt # Custom tab stops"]};function c(s,i,t){let a=s.split(",").map(o=>o.trim());if(a.length>t)return null;let l=[];for(let o of a){let n=/^\d+$/.test(o)?Number(o):NaN;if(!Number.isSafeInteger(n)||n<1||n>i)return null;l.push(n)}for(let o=1;o<l.length;o++)if(l[o]<=l[o-1])return null;return l}function z(s,i){if(i.length===1){let t=i[0];return t-s%t}for(let t of i)if(t>s)return t-s;if(i.length>=2){let t=i[i.length-1]-i[i.length-2],a=i[i.length-1],l=Math.floor((s-a)/t)+1;return a+l*t-s}return 1}function y(s,i,t){let{tabStops:a,leadingOnly:l}=i,o="",n=0,p=!0,e=0;for(let r of s)if(r===" ")if(l&&!p){if(e+1>t)throw new f(`expand: output size limit exceeded (${t} bytes)`,"output_size");o+=r,e++,n++}else{let d=z(n,a);if(d>t-e)throw new f(`expand: output size limit exceeded (${t} bytes)`,"output_size");o+=" ".repeat(d),e+=d,n+=d}else{r!==" "&&r!==" "&&(p=!1);let d=u(r);if(d>t-e)throw new f(`expand: output size limit exceeded (${t} bytes)`,"output_size");o+=r,e+=d,n++}return o}function b(s,i,t){if(s==="")return"";let a=s.split(`
3
+ `),l=s.endsWith(`
4
+ `)&&a[a.length-1]==="";l&&a.pop();let o=[],n=0;for(let p of a){let e=o.length>0?1:0,r=y(p,i,t-n-e);n+=e+u(r),o.push(r)}if(l&&n+1>t)throw new f(`expand: output size limit exceeded (${t} bytes)`,"output_size");return o.join(`
5
+ `)+(l?`
6
+ `:"")}var N={name:"expand",execute:async(s,i)=>{if(m(s))return x(w);let t={tabStops:[8],leadingOnly:!1},a=[],l=Math.min(i.limits.maxStringLength,i.limits.maxOutputSize),o=i.limits.maxArrayElements,n=0;for(;n<s.length;){let e=s[n];if(e==="-t"&&n+1<s.length){let r=c(s[n+1],l,o);if(!r)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${s[n+1]}'
7
+ `};t.tabStops=r,n+=2}else if(e.startsWith("-t")&&e.length>2){let r=c(e.slice(2),l,o);if(!r)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${e.slice(2)}'
8
+ `};t.tabStops=r,n++}else if(e==="--tabs"&&n+1<s.length){let r=c(s[n+1],l,o);if(!r)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${s[n+1]}'
9
+ `};t.tabStops=r,n+=2}else if(e.startsWith("--tabs=")){let r=c(e.slice(7),l,o);if(!r)return{exitCode:1,stdout:"",stderr:`expand: invalid tab size: '${e.slice(7)}'
10
+ `};t.tabStops=r,n++}else if(e==="-i"||e==="--initial")t.leadingOnly=!0,n++;else if(e==="--"){a.push(...s.slice(n+1));break}else{if(e.startsWith("-")&&e!=="-")return g("expand",e);a.push(e),n++}}let p="";if(a.length===0){let e=h(i.stdin)??"";p=b(e,t,l)}else for(let e of a){let r=i.fs.resolvePath(i.cwd,e),d=await i.fs.readFile(r);if(d===null)return{exitCode:1,stdout:p,stderr:`expand: ${e}: No such file or directory
11
+ `};p+=b(d,t,l-u(p))}return{exitCode:0,stdout:p,stderr:""}}},T={name:"expand",flags:[{flag:"-t",type:"value",valueHint:"number"},{flag:"-i",type:"boolean"}],stdinType:"text",needsFiles:!0};export{N as a,T as b};
@@ -0,0 +1,2 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as n,b as i,c as r}from"./chunk-KQSMX4HM.js";import{a,b as s}from"./chunk-QAYAQNCG.js";var f={name:"head",summary:"output the first part of files",usage:"head [OPTION]... [FILE]...",options:["-c, --bytes=NUM print the first NUM bytes","-n, --lines=NUM print the first NUM lines (default 10)","-q, --quiet never print headers giving file names","-v, --verbose always print headers giving file names"," --help display this help and exit"]},m={name:"head",async execute(t,l){if(s(t))return a(f);let e=n(t,"head");if(!e.ok)return e.error;let{lines:o,bytes:p}=e.options;return i(l,e.options,"head",d=>r(d,o,p))}},g={name:"head",flags:[{flag:"-n",type:"value",valueHint:"number"},{flag:"-c",type:"value",valueHint:"number"},{flag:"-q",type:"boolean"},{flag:"-v",type:"boolean"}],stdinType:"text",needsFiles:!0};export{m as a,g as b};
@@ -0,0 +1,15 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as j}from"./chunk-EZHC6HLV.js";import{a as w,b as k,d as N}from"./chunk-NJUHQKMR.js";import{l as S}from"./chunk-IQGNPH54.js";import{a as E}from"./chunk-U3UTFNHI.js";import{a as V}from"./chunk-WFEUQRHM.js";import{a as Z,b as T}from"./chunk-QAYAQNCG.js";import{sprintf as $}from"sprintf-js";function X(e){let l="",n=0;for(;n<e.length;){let r=e[n];if(r<128){l+=String.fromCharCode(r),n++;continue}if((r&224)===192){if(n+1<e.length&&(e[n+1]&192)===128&&r>=194){let o=(r&31)<<6|e[n+1]&63;l+=String.fromCharCode(o),n+=2;continue}l+=String.fromCharCode(r),n++;continue}if((r&240)===224){if(n+2<e.length&&(e[n+1]&192)===128&&(e[n+2]&192)===128){if(r===224&&e[n+1]<160){l+=String.fromCharCode(r),n++;continue}let o=(r&15)<<12|(e[n+1]&63)<<6|e[n+2]&63;if(o>=55296&&o<=57343){l+=String.fromCharCode(r),n++;continue}l+=String.fromCharCode(o),n+=3;continue}l+=String.fromCharCode(r),n++;continue}if((r&248)===240&&r<=244){if(n+3<e.length&&(e[n+1]&192)===128&&(e[n+2]&192)===128&&(e[n+3]&192)===128){if(r===240&&e[n+1]<144){l+=String.fromCharCode(r),n++;continue}let o=(r&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63;if(o>1114111){l+=String.fromCharCode(r),n++;continue}l+=String.fromCodePoint(o),n+=4;continue}l+=String.fromCharCode(r),n++;continue}l+=String.fromCharCode(r),n++}return l}var G={name:"printf",summary:"format and print data",usage:"printf [-v var] FORMAT [ARGUMENT...]",options:[" -v var assign the output to shell variable VAR rather than display it"," --help display this help and exit"],notes:["FORMAT controls the output like in C printf.","Escape sequences: \\n (newline), \\t (tab), \\\\ (backslash)","Format specifiers: %s (string), %d (integer), %f (float), %x (hex), %o (octal), %% (literal %)","Width and precision: %10s (width 10), %.2f (2 decimal places), %010d (zero-padded)","Flags: %- (left-justify), %+ (show sign), %0 (zero-pad)"]},ae={name:"printf",async execute(e,l){if(T(e))return Z(G);if(e.length===0)return{stdout:"",stderr:`printf: usage: printf format [arguments]
3
+ `,exitCode:2,internalStdinConsumed:0};let n=null,r=0;for(;r<e.length;){let t=e[r];if(t==="--"){r++;break}if(t==="-v"){if(r+1>=e.length)return{stdout:"",stderr:`printf: -v: option requires an argument
4
+ `,exitCode:1,internalStdinConsumed:0};if(n=e[r+1],!/^[a-zA-Z_][a-zA-Z0-9_]*(?:\[[^\]\n]+\])?$/.test(n)||/[;\r\\]/.test(n)||n.includes(".."))return{stdout:"",stderr:`printf: \`${n}': not a valid identifier
5
+ `,exitCode:2,internalStdinConsumed:0};r+=2}else{if(t.startsWith("-")&&t!=="-")break;break}}if(r>=e.length)return{stdout:"",stderr:`printf: usage: printf format [arguments]
6
+ `,exitCode:1,internalStdinConsumed:0};let o=e[r],i=e.slice(r+1);try{let t=Math.min(l.limits.maxStringLength,l.limits.maxOutputSize),s=N(o,t),a="",f=0,c=0,x=!1,p="",d=l.env.get("TZ");do{let{result:g,argsConsumed:v,error:C,errMsg:b,stopped:m}=D(s,i,c,d,t-f),I=E(g);if(I>t-f)throw new S(`printf: output size limit exceeded (${t} bytes)`,"string_length");if(a+=g,f+=I,c+=v,C&&(x=!0,b&&(p=b)),m)break}while(c<i.length&&c>0);if(c===0&&i.length>0,n){let g=n.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(['"]?)(.+?)\2\]$/);if(g){let v=g[1],C=g[3];if(C=C.replace(/\$([a-zA-Z_][a-zA-Z0-9_]*)/g,(b,m)=>l.env.get(m)??""),l.assignShellVariable)await l.assignShellVariable(v,a,C);else throw new Error("printf -v array assignment requires an interpreter assignment gateway")}else if(l.assignShellVariable)await l.assignShellVariable(n,a);else{if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(n))throw new Error(`${n}: not a valid identifier`);l.env.set(n,a)}return{stdout:"",stderr:p,exitCode:x?1:0,internalStdinConsumed:0}}return{stdout:a,stderr:p,exitCode:x?1:0,internalStdinConsumed:0}}catch(t){if(t instanceof S||typeof t=="object"&&t!==null&&"name"in t&&t.name==="ExitError")throw t;return{stdout:"",stderr:`printf: ${V(t)}
7
+ `,exitCode:1,internalStdinConsumed:0}}}};function D(e,l,n,r,o=10*1024*1024){let i="",t=0,s=0,a=!1,f="",c=0,x=p=>{let d=E(p);if(d>o-c)throw new S(`printf: output size limit exceeded (${o} bytes)`,"string_length");i+=p,c+=d};for(;t<e.length;)if(e[t]==="%"&&t+1<e.length){let p=t;if(t++,e[t]==="%"){x("%"),t++;continue}let d=e.slice(p).match(/^%(-?\d*)(?:\.(\d+))?\(([^)]*)\)T/);if(d){let u=d[1]?parseInt(d[1],10):0,F=d[2]?parseInt(d[2],10):-1;w(u,o,"width"),F!==-1&&w(F,o,"precision");let H=d[3],L=d[0],A=l[n+s]||"";s++;let M;A===""||A==="-1"||A==="-2"?M=Math.floor(Date.now()/1e3):M=parseInt(A,10)||0;let _=j(H,M,r,{maxOperations:o-c,maxOutputBytes:o-c});_=k(_,u,F,o-c),x(_),t=p+L.length;continue}for(;t<e.length&&"+-0 #'".includes(e[t]);)t++;let g=!1;if(e[t]==="*")g=!0,t++;else for(;t<e.length&&/\d/.test(e[t]);)t++;let v=!1;if(e[t]===".")if(t++,e[t]==="*")v=!0,t++;else for(;t<e.length&&/\d/.test(e[t]);)t++;t<e.length&&"hlL".includes(e[t])&&t++;let C=e[t]||"";t++;let m=e.slice(p,t);if(g){let u=parseInt(l[n+s]||"0",10);w(u,o-c,"width"),s++,m=m.replace("*",String(u))}if(v){let u=parseInt(l[n+s]||"0",10);u>=0?w(u,o-c,"precision"):Number.isSafeInteger(u)||w(u,o-c,"precision"),s++,m=m.replace(".*",`.${u}`)}J(m,o-c);let I=l[n+s]||"";s++;let{value:q,parseError:R,parseErrMsg:W,stopped:U}=Q(m,C,I,o-c);if(x(q),R&&(a=!0,W&&(f=W)),U)return{result:i,argsConsumed:s,error:a,errMsg:f,stopped:!0}}else x(e[t]),t++;return{result:i,argsConsumed:s,error:a,errMsg:f,stopped:!1}}function Q(e,l,n,r){let o=!1,i="";switch(l){case"d":case"i":{let t=z(n);return o=h,o&&(i=`printf: ${n}: invalid number
8
+ `),{value:P(e,t),parseError:o,parseErrMsg:i}}case"o":{let t=z(n);return o=h,o&&(i=`printf: ${n}: invalid number
9
+ `),{value:K(e,t),parseError:o,parseErrMsg:i}}case"u":{let t=z(n);o=h,o&&(i=`printf: ${n}: invalid number
10
+ `);let s=t<0?t>>>0:t;return{value:P(e.replace("u","d"),s),parseError:o,parseErrMsg:i}}case"x":case"X":{let t=z(n);return o=h,o&&(i=`printf: ${n}: invalid number
11
+ `),{value:Y(e,t),parseError:o,parseErrMsg:i}}case"e":case"E":case"f":case"F":case"g":case"G":{let t=parseFloat(n)||0;return{value:ee(e,l,t),parseError:!1,parseErrMsg:""}}case"c":{if(n==="")return{value:"",parseError:!1,parseErrMsg:""};let a=new TextEncoder().encode(n)[0];return{value:String.fromCharCode(a),parseError:!1,parseErrMsg:""}}case"s":return{value:B(e,n,r),parseError:!1,parseErrMsg:""};case"q":return{value:O(e,n,r),parseError:!1,parseErrMsg:""};case"b":{let t=te(n,r);return{value:t.value,parseError:!1,parseErrMsg:"",stopped:t.stopped}}default:try{return{value:$(e,n),parseError:!1,parseErrMsg:""}}catch{return{value:"",parseError:!0,parseErrMsg:`printf: [sprintf] unexpected placeholder
12
+ `}}}}function J(e,l){let n=e.match(/^%[-+0 #' ]*(\d*)(?:\.(\d*))?/);if(!n)return;let r=n[1]?Number(n[1]):0,o=n[2]!==void 0?Number(n[2]):-1;w(r,l,"width"),o!==-1&&w(o,l,"precision")}var h=!1;function z(e){h=!1;let l=e.trimStart(),n=l!==l.trimEnd();if(e=l.trimEnd(),e.startsWith("'")&&e.length>=2||e.startsWith('"')&&e.length>=2)return e.charCodeAt(1);if(e.startsWith("\\'")&&e.length>=3||e.startsWith('\\"')&&e.length>=3)return e.charCodeAt(2);if(e.startsWith("+")&&(e=e.slice(1)),e.startsWith("0x")||e.startsWith("0X")){let r=parseInt(e,16);return Number.isNaN(r)?(h=!0,0):(n&&(h=!0),r)}if(e.startsWith("0")&&e.length>1&&/^-?0[0-7]+$/.test(e))return n&&(h=!0),parseInt(e,8)||0;if(/^\d+#/.test(e)){h=!0;let r=e.match(/^(\d+)#/);return r?parseInt(r[1],10):0}if(e!==""&&!/^-?\d+$/.test(e)){h=!0;let r=parseInt(e,10);return Number.isNaN(r)?0:r}return n&&(h=!0),parseInt(e,10)||0}function P(e,l){let n=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?[diu]$/);if(!n)return $(e.replace(/\.\d*/,""),l);let r=n[1]||"",o=n[2]?parseInt(n[2],10):0,i=n[3]!==void 0?n[4]?parseInt(n[4],10):0:-1,t=l<0,s=Math.abs(l),a=String(s);i>=0&&(a=a.padStart(i,"0"));let f="";t?f="-":r.includes("+")?f="+":r.includes(" ")&&(f=" ");let c=f+a;return o>c.length&&(r.includes("-")?c=c.padEnd(o," "):r.includes("0")&&i<0?c=f+a.padStart(o-f.length,"0"):c=c.padStart(o," ")),c}function K(e,l){let n=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?o$/);if(!n)return $(e,l);let r=n[1]||"",o=n[2]?parseInt(n[2],10):0,i=n[3]!==void 0?n[4]?parseInt(n[4],10):0:-1,t=Math.abs(l).toString(8);i>=0&&(t=t.padStart(i,"0")),r.includes("#")&&!t.startsWith("0")&&(t=`0${t}`);let s=t;return o>s.length&&(r.includes("-")?s=s.padEnd(o," "):r.includes("0")&&i<0?s=s.padStart(o,"0"):s=s.padStart(o," ")),s}function Y(e,l){let n=e.includes("X"),r=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?[xX]$/);if(!r)return $(e,l);let o=r[1]||"",i=r[2]?parseInt(r[2],10):0,t=r[3]!==void 0?r[4]?parseInt(r[4],10):0:-1,s=Math.abs(l).toString(16);n&&(s=s.toUpperCase()),t>=0&&(s=s.padStart(t,"0"));let a="";o.includes("#")&&l!==0&&(a=n?"0X":"0x");let f=a+s;return i>f.length&&(o.includes("-")?f=f.padEnd(i," "):o.includes("0")&&t<0?f=a+s.padStart(i-a.length,"0"):f=f.padStart(i," ")),f}function y(e,l){if(e===""){if(l<2)throw new S(`printf: output size limit exceeded (${l} bytes)`,"string_length");return"''"}if(/^[a-zA-Z0-9_./-]+$/.test(e)){if(E(e)>l)throw new S(`printf: output size limit exceeded (${l} bytes)`,"string_length");return e}let n=/[\x00-\x1f\x7f-\xff]/.test(e),r=n?3:0;for(let i of e){let t=i.charCodeAt(0);if(n?i==="'"||i==="\\"||i===`
13
+ `||i===" "||i==="\r"||i==="\x07"||i==="\b"||i==="\f"||i==="\v"||i==="\x1B"||i==='"'?r+=2:t<32||t>=127&&t<=255?r+=4:r+=E(i):r+=E(i)+(" |&;<>()$`\\\"'*?[#~=%!{}".includes(i)?1:0),r>l)throw new S(`printf: output size limit exceeded (${l} bytes)`,"string_length")}if(n){let i="$'";for(let t of e){let s=t.charCodeAt(0);t==="'"?i+="\\'":t==="\\"?i+="\\\\":t===`
14
+ `?i+="\\n":t===" "?i+="\\t":t==="\r"?i+="\\r":t==="\x07"?i+="\\a":t==="\b"?i+="\\b":t==="\f"?i+="\\f":t==="\v"?i+="\\v":t==="\x1B"?i+="\\E":s<32||s>=127&&s<=255?i+=`\\${s.toString(8).padStart(3,"0")}`:t==='"'?i+='\\"':i+=t}return i+="'",i}let o="";for(let i of e)" |&;<>()$`\\\"'*?[#~=%!{}".includes(i)?o+=`\\${i}`:o+=i;return o}function B(e,l,n){let r=e.match(/^%(-?)(\d*)(\.(\d*))?s$/);if(!r)return $(e.replace(/0+(?=\d)/,""),l);let o=r[1]==="-",i=r[2]?parseInt(r[2],10):0,t=r[3]!==void 0?r[4]?parseInt(r[4],10):0:-1,s=o?-i:i;return k(l,s,t,n)}function O(e,l,n){let r=y(l,n),o=e.match(/^%(-?)(\d*)q$/);if(!o)return r;let i=o[1]==="-",t=o[2]?parseInt(o[2],10):0;return k(r,i?-t:t,-1,n)}function ee(e,l,n){let r=e.match(/^%([- +#0']*)(\d*)(\.(\d*))?[eEfFgG]$/);if(!r)return $(e,n);let o=r[1]||"",i=r[2]?parseInt(r[2],10):0,t=r[3]!==void 0?r[4]?parseInt(r[4],10):0:6,s,a=l.toLowerCase();if(a==="e"?(s=n.toExponential(t),s=s.replace(/e([+-])(\d)$/,"e$10$2"),l==="E"&&(s=s.toUpperCase())):a==="f"?(s=n.toFixed(t),o.includes("#")&&t===0&&!s.includes(".")&&(s+=".")):a==="g"?(s=n.toPrecision(t||1),o.includes("#")||(s=s.replace(/\.?0+$/,""),s=s.replace(/\.?0+e/,"e")),s=s.replace(/e([+-])(\d)$/,"e$10$2"),l==="G"&&(s=s.toUpperCase())):s=n.toString(),n>=0&&(o.includes("+")?s=`+${s}`:o.includes(" ")&&(s=` ${s}`)),i>s.length)if(o.includes("-"))s=s.padEnd(i," ");else if(o.includes("0")){let f=s.match(/^[+ -]/)?.[0]||"",c=f?s.slice(1):s;s=f+c.padStart(i-f.length,"0")}else s=s.padStart(i," ");return s}function te(e,l){if(E(e)>l)throw new S(`printf: output size limit exceeded (${l} bytes)`,"string_length");let n="",r=0;for(;r<e.length;)if(e[r]==="\\"&&r+1<e.length)switch(e[r+1]){case"n":n+=`
15
+ `,r+=2;break;case"t":n+=" ",r+=2;break;case"r":n+="\r",r+=2;break;case"\\":n+="\\",r+=2;break;case"a":n+="\x07",r+=2;break;case"b":n+="\b",r+=2;break;case"f":n+="\f",r+=2;break;case"v":n+="\v",r+=2;break;case"c":return{value:n,stopped:!0};case"x":{let i=[],t=r;for(;t+1<e.length&&e[t]==="\\"&&e[t+1]==="x";){let s="",a=t+2;for(;a<e.length&&a<t+4&&/[0-9a-fA-F]/.test(e[a]);)s+=e[a],a++;if(s)i.push(parseInt(s,16)),t=a;else break}i.length>0?(n+=X(i),r=t):(n+="\\x",r+=2);break}case"u":{let i="",t=r+2;for(;t<e.length&&t<r+6&&/[0-9a-fA-F]/.test(e[t]);)i+=e[t],t++;i?(n+=String.fromCodePoint(parseInt(i,16)),r=t):(n+="\\u",r+=2);break}case"0":{let i="",t=r+2;for(;t<e.length&&t<r+5&&/[0-7]/.test(e[t]);)i+=e[t],t++;i?n+=String.fromCharCode(parseInt(i,8)):n+="\0",r=t;break}case"1":case"2":case"3":case"4":case"5":case"6":case"7":{let i="",t=r+1;for(;t<e.length&&t<r+4&&/[0-7]/.test(e[t]);)i+=e[t],t++;n+=String.fromCharCode(parseInt(i,8)),r=t;break}default:n+=e[r],r++}else n+=e[r],r++;return{value:n,stopped:!1}}var fe={name:"printf",flags:[{flag:"-v",type:"value",valueHint:"string"}],stdinType:"none",needsArgs:!0};export{ae as a,fe as b};
@@ -0,0 +1,21 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{a as be}from"./chunk-DLL7UR66.js";import{a as U,b as $}from"./chunk-CHWP6GRK.js";import{a as O,b as X}from"./chunk-EOMWWW4L.js";import{a as V}from"./chunk-T7CFNHX6.js";import{a as H}from"./chunk-CBM6J4AL.js";import{e as Ce}from"./chunk-Q6ZH76O4.js";import{l as y}from"./chunk-IQGNPH54.js";import{a as D,d as ne}from"./chunk-U3UTFNHI.js";import{a as ke,b as Ie,c as Ee}from"./chunk-QAYAQNCG.js";var Je=1e4,et=100,tt=new X(/\s+/);function me(e={}){let{fieldSep:t=tt,maxIterations:n=Je,maxRecursionDepth:r=et,maxOutputSize:s=0,maxArrayElements:a=1e5,fs:o,cwd:l,exec:c,coverage:u,requireDefenseContext:f}=e;return{FS:" ",OFS:" ",ORS:`
3
+ `,OFMT:"%.6g",NR:0,NF:0,FNR:0,FILENAME:"",RSTART:0,RLENGTH:-1,SUBSEP:"",fields:[],line:"",vars:Object.create(null),arrays:Object.create(null),arrayAliases:new Map,ARGC:0,ARGV:Object.create(null),ENVIRON:Object.create(null),functions:new Map,getlineCommandStreams:new Map,getlineFileStreams:new Map,fieldSep:t,maxIterations:n,maxRecursionDepth:r,maxOutputSize:s,maxArrayElements:a,arrayElementCount:0,recordsProcessed:0,currentRecursionDepth:0,exitCode:0,shouldExit:!1,shouldNext:!1,shouldNextFile:!1,loopBreak:!1,loopContinue:!1,hasReturn:!1,inEndBlock:!1,output:"",openedFiles:new Set,fs:o,cwd:l,exec:c,coverage:u,requireDefenseContext:f}}function Oe(e,t,n){switch(n){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return t!==0?e/t:0;case"%":return t!==0?e%t:0;case"^":case"**":return e**t;default:return 0}}function P(e){return typeof e=="number"?e!==0:!(e===""||e==="0")}function b(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function v(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}function Ne(e){if(typeof e=="number")return!0;let t=String(e).trim();return t===""?!1:!Number.isNaN(Number(t))}function J(e,t){try{return O(e).test(t)}catch{return!1}}function ie(e,t){if(t==="")return[];let n=e.maxArrayElements,r=n<4294967294?n+1:void 0,s=e.FS===" "?t.trim().split(/\s+/,r).filter(Boolean):e.fieldSep.split(t,r);if(s.length>n)throw new y(`field count limit exceeded (${n})`,"array_elements");return s}function K(e,t){if(!(Number.isFinite(t)&&t<=e.fields.length)){if(!Number.isFinite(t)||t>e.maxArrayElements)throw new y(`field count limit exceeded (${e.maxArrayElements})`,"array_elements");if(e.maxOutputSize>0&&(t-1)*D(e.OFS)>e.maxOutputSize)throw Le(e);for(;e.fields.length<t;)e.fields.push("")}}function Le(e){return new y(`record size limit exceeded (${e.maxOutputSize} bytes)`,"string_length")}function q(e){if(e.maxOutputSize>0){let t=Math.max(0,e.fields.length-1)*D(e.OFS);for(let n of e.fields)if(t+=D(n),t>e.maxOutputSize)break;if(t>e.maxOutputSize)throw Le(e)}e.line=e.fields.join(e.OFS)}function re(e,t){return t===0?e.line:t<0||t>e.fields.length?"":e.fields[t-1]??""}function ye(e,t,n){t===0?(e.line=v(n),e.fields=ie(e,e.line),e.NF=e.fields.length):t>0&&(K(e,t),e.fields[t-1]=v(n),e.NF=e.fields.length,q(e))}function j(e,t){e.line=t,e.fields=ie(e,t),e.NF=e.fields.length}function Te(e,t){if(e.FS=t,t===" ")e.fieldSep=new X(/\s+/);else try{e.fieldSep=O(t)}catch{e.fieldSep=O(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))}}function F(e){if(typeof e=="number")return e;let t=parseFloat(e);return Number.isNaN(t)?0:t}function L(e){return typeof e=="string"?e:(Number.isInteger(e),String(e))}var Me=10*1024*1024;function ge(e){return new Ce(e,"awk string",()=>new y(`string size limit exceeded (${e} bytes)`,"string_length"))}function G(e){return e.maxOutputSize>0?e.maxOutputSize:Me}function se(e,t,n,r,s){let a=ge(s),o=0,l=0,c=0;for(let u of t.matchAll(e)){let f=u.index??0;l++,a.append(e.slice(o,f)),n(l)?(a.append(r(u)),c++):a.append(u[0]),o=f+u[0].length}return a.append(e.slice(o)),{value:a.build(),replacements:c}}async function ae(e,t){if(e.type==="regex")return e.pattern;let n=L(await t.evalExpr(e));return n.startsWith("/")&&n.endsWith("/")&&(n=n.slice(1,-1)),n}async function Fe(e,t){return e?e.type==="variable"?e.name:e.type==="field"?`$${Math.floor(F(await t.evalExpr(e.index)))}`:"$0":"$0"}function xe(e,t){if(e==="$0")return t.line;if(e.startsWith("$")){let n=Number(e.slice(1))-1;return t.fields[n]||""}return L(t.vars[e]??"")}function De(e,t,n){if(e==="$0")n.line=t,n.fields=ie(n,t),n.NF=n.fields.length;else if(e.startsWith("$")){let r=Number(e.slice(1))-1;K(n,r+1),n.fields[r]=t,n.NF=n.fields.length,q(n)}else n.vars[e]=t}async function nt(e,t,n){return e.length===0?t.line.length:L(await n.evalExpr(e[0])).length}async function it(e,t,n){if(e.length<2)return"";let r=L(await n.evalExpr(e[0])),s=Math.floor(F(await n.evalExpr(e[1])))-1;if(e.length>=3){let a=Math.floor(F(await n.evalExpr(e[2])));return r.substr(Math.max(0,s),a)}return r.substr(Math.max(0,s))}async function rt(e,t,n){if(e.length<2)return 0;let r=L(await n.evalExpr(e[0])),s=L(await n.evalExpr(e[1])),a=r.indexOf(s);return a===-1?0:a+1}async function st(e,t,n){if(e.length<2)return 0;let r=L(await n.evalExpr(e[0])),s=e[1];if(s.type!=="variable")return 0;let a=s.name,o=t.FS;if(e.length>=3){let f=e[2];if(f.type==="regex")o=O(f.pattern);else{let I=L(await n.evalExpr(f));o=I===" "?O("\\s+"):I}}else t.FS===" "&&(o=O("\\s+"));let l=Object.keys(t.arrays[a]??{}).length,c=t.maxArrayElements-t.arrayElementCount+l,u=typeof o=="string"?r.split(o,c+1):o.split(r,c+1);if(u.length>c)throw new y(`array element limit exceeded (${t.maxArrayElements})`,"array_elements");t.arrays[a]=Object.create(null);for(let f=0;f<u.length;f++)t.arrays[a][String(f+1)]=u[f];return t.arrayElementCount+=u.length-l,u.length}async function at(e,t,n){if(e.length<2)return 0;let r=await ae(e[0],n),s=L(await n.evalExpr(e[1])),a=await Fe(e[2],n),o=xe(a,t);try{let l=O(r,"g"),c=se(o,l,u=>u===1,u=>_e(s,u[0],G(t)),G(t));return De(a,c.value,t),c.replacements}catch(l){return V(l),0}}async function ot(e,t,n){if(e.length<2)return 0;let r=await ae(e[0],n),s=L(await n.evalExpr(e[1])),a=await Fe(e[2],n),o=xe(a,t);try{let l=O(r,"g"),c=se(o,l,()=>!0,u=>_e(s,u[0],G(t)),G(t));return De(a,c.value,t),c.replacements}catch(l){return V(l),0}}function _e(e,t,n){let r=ge(n),s=0;for(;s<e.length;)if(e[s]==="\\"&&s+1<e.length){let a=e[s+1];a==="&"?(r.append("&"),s+=2):a==="\\"?(r.append("\\"),s+=2):(r.append(e[s+1]),s+=2)}else e[s]==="&"?(r.append(t),s++):(r.append(e[s]),s++);return r.build()}async function lt(e,t,n){if(e.length<2)return t.RSTART=0,t.RLENGTH=-1,0;let r=L(await n.evalExpr(e[0])),s=await ae(e[1],n);try{let o=O(s).exec(r);if(o)return t.RSTART=o.index+1,t.RLENGTH=o[0].length,t.RSTART}catch{}return t.RSTART=0,t.RLENGTH=-1,0}async function ut(e,t,n){if(e.length<3)return"";let r=await ae(e[0],n),s=L(await n.evalExpr(e[1])),a=L(await n.evalExpr(e[2])),o=e.length>=4?L(await n.evalExpr(e[3])):t.line;try{let l=a.toLowerCase()==="g",c=l?0:parseInt(a,10)||1;if(l){let u=O(r,"g");return se(o,u,()=>!0,f=>Pe(s,f[0],f.slice(1),G(t)),G(t)).value}else{let u=O(r,"g");return se(o,u,f=>f===c,f=>Pe(s,f[0],f.slice(1),G(t)),G(t)).value}}catch(l){return V(l),o}}function Pe(e,t,n,r){let s=ge(r),a=0;for(;a<e.length;)if(e[a]==="\\"&&a+1<e.length){let o=e[a+1];if(o==="&")s.append("&"),a+=2;else if(o==="0")s.append(t),a+=2;else if(o>="1"&&o<="9"){let l=parseInt(o,10)-1;s.append(n[l]||""),a+=2}else o==="n"?(s.append(`
4
+ `),a+=2):o==="t"?(s.append(" "),a+=2):(s.append(o),a+=2)}else e[a]==="&"?(s.append(t),a++):(s.append(e[a]),a++);return s.build()}async function ct(e,t,n){return e.length===0?"":L(await n.evalExpr(e[0])).toLowerCase()}async function ht(e,t,n){return e.length===0?"":L(await n.evalExpr(e[0])).toUpperCase()}async function pt(e,t,n){if(e.length===0)return"";let r=L(await n.evalExpr(e[0])),s=[];for(let a=1;a<e.length;a++)s.push(await n.evalExpr(e[a]));return oe(r,s,G(t))}async function ft(e,t,n){return e.length===0?0:Math.floor(F(await n.evalExpr(e[0])))}async function dt(e,t,n){return e.length===0?0:Math.sqrt(F(await n.evalExpr(e[0])))}async function Et(e,t,n){return e.length===0?0:Math.sin(F(await n.evalExpr(e[0])))}async function mt(e,t,n){return e.length===0?0:Math.cos(F(await n.evalExpr(e[0])))}async function Nt(e,t,n){let r=e.length>0?F(await n.evalExpr(e[0])):0,s=e.length>1?F(await n.evalExpr(e[1])):0;return Math.atan2(r,s)}async function yt(e,t,n){return e.length===0?0:Math.log(F(await n.evalExpr(e[0])))}async function wt(e,t,n){return e.length===0?1:Math.exp(F(await n.evalExpr(e[0])))}function gt(e,t,n){return t.random?t.random():Math.random()}async function St(e,t,n){let r=e.length>0?F(await n.evalExpr(e[0])):Date.now();return t.vars._srand_seed=r,r}function Rt(e,t){return()=>{throw new Error(`${e}() is not supported - ${t}`)}}function we(e){return()=>{throw new Error(`function '${e}()' is not implemented`)}}var At=1e4;function oe(e,t,n=Me){let r=0,s="",a=0,o=0,l=Math.min(At,n),c=u=>{let f=D(u);if(f>n-a)throw new y(`formatted string size limit exceeded (${n} bytes)`,"string_length");s+=u,a+=f};for(;o<e.length;)if(e[o]==="%"&&o+1<e.length){let u=o+1,f="",I="",C="",A,T=u;for(;u<e.length&&/\d/.test(e[u]);)u++;u>T&&e[u]==="$"?(A=parseInt(e.substring(T,u),10)-1,u++):u=T;let de=()=>{if(u<e.length){if(u+1<e.length&&(e[u]==="h"&&e[u+1]==="h"||e[u]==="l"&&e[u+1]==="l")){u+=2;return}/[lzjh]/.test(e[u])&&u++}};for(;u<e.length&&/[-+ #0]/.test(e[u]);)f+=e[u++];if(e[u]==="*"){let p=t[r++],N=p!==void 0?Math.floor(Number(p)):0;if(!Number.isFinite(N)||!Number.isSafeInteger(N))throw new y(`printf width limit exceeded (${l} bytes)`,"string_length");N<0?(f+="-",I=String(-N)):I=String(N),u++}else for(;u<e.length&&/\d/.test(e[u]);)I+=e[u++];if(I&&parseInt(I,10)>l)throw new y(`printf width limit exceeded (${l} bytes)`,"string_length");if(e[u]==="."){if(u++,e[u]==="*"){let p=t[r++],N=p!==void 0?Math.floor(Number(p)):0;if(!Number.isFinite(N)||!Number.isSafeInteger(N))throw new y(`printf precision limit exceeded (${l} bytes)`,"string_length");C=N<0?"":String(N),u++}else for(;u<e.length&&/\d/.test(e[u]);)C+=e[u++];if(C&&parseInt(C,10)>l)throw new y(`printf precision limit exceeded (${l} bytes)`,"string_length")}de();let z=e[u],w=t[A!==void 0?A:r];switch(z){case"s":{let p=w!==void 0?String(w):"";if(C&&(p=p.substring(0,parseInt(C,10))),I){let N=parseInt(I,10);f.includes("-")?p=p.padEnd(N):p=p.padStart(N)}c(p),A===void 0&&r++;break}case"d":case"i":{let p=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(p)&&(p=0);let N=p<0,g=Math.abs(p).toString();if(C){let _=parseInt(C,10);g=g.padStart(_,"0")}let d="";N?d="-":f.includes("+")?d="+":f.includes(" ")&&(d=" ");let k=d+g;if(I){let _=parseInt(I,10);f.includes("-")?k=k.padEnd(_):f.includes("0")&&!C?k=d+g.padStart(_-d.length,"0"):k=k.padStart(_)}c(k),A===void 0&&r++;break}case"f":{let p=w!==void 0?Number(w):0;Number.isNaN(p)&&(p=0);let N=C?parseInt(C,10):6;if(N>100)throw new y("printf floating-point precision limit exceeded (100 digits)","string_length");let g=p.toFixed(N);if(I){let d=parseInt(I,10);f.includes("-")?g=g.padEnd(d):g=g.padStart(d)}c(g),A===void 0&&r++;break}case"e":case"E":{let p=w!==void 0?Number(w):0;Number.isNaN(p)&&(p=0);let N=C?parseInt(C,10):6;if(N>100)throw new y("printf floating-point precision limit exceeded (100 digits)","string_length");let g=p.toExponential(N);if(z==="E"&&(g=g.toUpperCase()),I){let d=parseInt(I,10);f.includes("-")?g=g.padEnd(d):g=g.padStart(d)}c(g),A===void 0&&r++;break}case"g":case"G":{let p=w!==void 0?Number(w):0;Number.isNaN(p)&&(p=0);let N=C?parseInt(C,10):6;if(N>100)throw new y("printf floating-point precision limit exceeded (100 digits)","string_length");let g=p!==0?Math.floor(Math.log10(Math.abs(p))):0,d;if(p===0?d="0":g<-4||g>=N?(d=p.toExponential(N-1),z==="G"&&(d=d.toUpperCase())):d=p.toPrecision(N),d.includes(".")&&(d=d.replace(/\.?0+$/,"").replace(/\.?0+e/,"e")),d.includes("e")&&(d=d.replace(/\.?0+e/,"e")),I){let k=parseInt(I,10);f.includes("-")?d=d.padEnd(k):d=d.padStart(k)}c(d),A===void 0&&r++;break}case"x":case"X":{let p=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(p)&&(p=0);let N=Math.abs(p).toString(16);if(z==="X"&&(N=N.toUpperCase()),C){let k=parseInt(C,10);N=N.padStart(k,"0")}let g=p<0?"-":"",d=g+N;if(I){let k=parseInt(I,10);f.includes("-")?d=d.padEnd(k):f.includes("0")&&!C?d=g+N.padStart(k-g.length,"0"):d=d.padStart(k)}c(d),A===void 0&&r++;break}case"o":{let p=w!==void 0?Math.floor(Number(w)):0;Number.isNaN(p)&&(p=0);let N=Math.abs(p).toString(8);if(C){let k=parseInt(C,10);N=N.padStart(k,"0")}let g=p<0?"-":"",d=g+N;if(I){let k=parseInt(I,10);f.includes("-")?d=d.padEnd(k):f.includes("0")&&!C?d=g+N.padStart(k-g.length,"0"):d=d.padStart(k)}c(d),A===void 0&&r++;break}case"c":{c(typeof w=="number"?String.fromCharCode(w):String(w??"").charAt(0)||""),A===void 0&&r++;break}case"%":c("%");break;default:c(e.substring(o,u+1))}o=u+1}else if(e[o]==="\\"&&o+1<e.length){let u=e[o+1];switch(u){case"n":c(`
5
+ `);break;case"t":c(" ");break;case"r":c("\r");break;case"\\":c("\\");break;default:c(u)}o+=2}else c(e[o++]);return s}var Ge=new Map([["length",nt],["substr",it],["index",rt],["split",st],["sub",at],["gsub",ot],["match",lt],["gensub",ut],["tolower",ct],["toupper",ht],["sprintf",pt],["int",ft],["sqrt",dt],["sin",Et],["cos",mt],["atan2",Nt],["log",yt],["exp",wt],["rand",gt],["srand",St],["system",Rt("system","shell execution not allowed in sandboxed environment")],["close",()=>0],["fflush",()=>0],["systime",we("systime")],["mktime",we("mktime")],["strftime",we("strftime")]]);function le(e,t){switch(t){case"FS":return e.FS;case"OFS":return e.OFS;case"ORS":return e.ORS;case"OFMT":return e.OFMT;case"NR":return e.NR;case"NF":return e.NF;case"FNR":return e.FNR;case"FILENAME":return e.FILENAME;case"RSTART":return e.RSTART;case"RLENGTH":return e.RLENGTH;case"SUBSEP":return e.SUBSEP;case"ARGC":return e.ARGC}return e.vars[t]??""}function Q(e,t,n){switch(t){case"FS":Te(e,v(n));return;case"OFS":e.OFS=v(n);return;case"ORS":e.ORS=v(n);return;case"OFMT":e.OFMT=v(n);return;case"NR":e.NR=Math.floor(b(n));return;case"NF":{let r=Math.floor(b(n));if(!Number.isFinite(r))K(e,r);else{if(r<0)throw new Error("NF set to negative value");r<e.NF?(e.fields=e.fields.slice(0,r),q(e)):r<=e.NF||(K(e,r),q(e))}e.NF=r;return}case"FNR":e.FNR=Math.floor(b(n));return;case"FILENAME":e.FILENAME=v(n);return;case"RSTART":e.RSTART=Math.floor(b(n));return;case"RLENGTH":e.RLENGTH=Math.floor(b(n));return;case"SUBSEP":e.SUBSEP=v(n);return}e.vars[t]=n}function ee(e,t){let n=t,r=new Set,s=e.arrayAliases.get(n);for(;s!==void 0&&!r.has(n);)r.add(n),n=s,s=e.arrayAliases.get(n);return n}function ue(e,t,n){if(t==="ARGV")return e.ARGV[n]??"";if(t==="ENVIRON")return e.ENVIRON[n]??"";let r=ee(e,t);return e.arrays[r]?.[n]??""}function Se(e,t,n,r){let s=ee(e,t);if(e.arrays[s]||(e.arrays[s]=Object.create(null)),!(n in e.arrays[s])){if(e.arrayElementCount>=e.maxArrayElements)throw new y(`array element limit exceeded (${e.maxArrayElements})`,"array_elements");e.arrayElementCount++}e.arrays[s][n]=r}function Be(e,t,n){if(t==="ARGV")return e.ARGV[n]!==void 0;if(t==="ENVIRON")return e.ENVIRON[n]!==void 0;let r=ee(e,t);return e.arrays[r]?.[n]!==void 0}function Ue(e,t,n){let r=ee(e,t);e.arrays[r]&&(n in e.arrays[r]&&e.arrayElementCount--,delete e.arrays[r][n])}function $e(e,t){let n=ee(e,t);e.arrayElementCount-=Object.keys(e.arrays[n]??{}).length,delete e.arrays[n]}var He=null;function We(e){He=e}function M(e,t){U(e.requireDefenseContext,"awk",t)}function R(e,t,n){return $(e.requireDefenseContext,"awk",t,n)}async function E(e,t){switch(M(e,"expression evaluation"),e.coverage?.hit(`awk:expr:${t.type}`),t.type){case"number":return t.value;case"string":return t.value;case"regex":return J(t.pattern,e.line)?1:0;case"field":return vt(e,t);case"variable":return le(e,t.name);case"array_access":return kt(e,t);case"binary":return It(e,t);case"unary":return Ot(e,t);case"ternary":return P(await R(e,"ternary condition evaluation",()=>E(e,t.condition)))?await R(e,"ternary consequent evaluation",()=>E(e,t.consequent)):await R(e,"ternary alternate evaluation",()=>E(e,t.alternate));case"call":return Lt(e,t.name,t.args);case"assignment":return Pt(e,t);case"pre_increment":return Mt(e,t.operand);case"pre_decrement":return Ft(e,t.operand);case"post_increment":return xt(e,t.operand);case"post_decrement":return Dt(e,t.operand);case"in":return _t(e,t.key,t.array);case"getline":return Gt(e,t.variable,t.file,t.command);case"tuple":return $t(e,t.elements);default:return""}}async function vt(e,t){M(e,"field reference evaluation");let n=Math.floor(b(await R(e,"field index evaluation",()=>E(e,t.index))));return re(e,n)}async function kt(e,t){M(e,"array access evaluation");let n=v(await R(e,"array key evaluation",()=>E(e,t.key)));return ue(e,t.array,n)}async function It(e,t){M(e,"binary expression evaluation");let n=t.operator;if(n==="||")return P(await R(e,"logical-or left evaluation",()=>E(e,t.left)))||P(await R(e,"logical-or right evaluation",()=>E(e,t.right)))?1:0;if(n==="&&")return P(await R(e,"logical-and left evaluation",()=>E(e,t.left)))&&P(await R(e,"logical-and right evaluation",()=>E(e,t.right)))?1:0;if(n==="~"){let l=await R(e,"regex left evaluation",()=>E(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let c=t.right.type==="regex"?t.right.pattern:v(await R(e,"regex right evaluation",()=>E(e,t.right)));try{return O(c).test(v(l))?1:0}catch{return 0}}if(n==="!~"){let l=await R(e,"negated-regex left evaluation",()=>E(e,t.left));t.right.type==="regex"&&e.coverage?.hit("awk:expr:regex");let c=t.right.type==="regex"?t.right.pattern:v(await R(e,"negated-regex right evaluation",()=>E(e,t.right)));try{return O(c).test(v(l))?0:1}catch{return 1}}let r=await R(e,"binary left evaluation",()=>E(e,t.left)),s=await R(e,"binary right evaluation",()=>E(e,t.right));if(n===" "){let l=v(r)+v(s);if(e.maxOutputSize>0&&l.length>e.maxOutputSize)throw new y(`awk: string concatenation size limit exceeded (${e.maxOutputSize} bytes)`,"string_length",e.output);return l}if(Ct(n))return bt(r,s,n);let a=b(r),o=b(s);return Oe(a,o,n)}function Ct(e){return["<","<=",">",">=","==","!="].includes(e)}function bt(e,t,n){let r=Ne(e),s=Ne(t);if(r&&s){let l=b(e),c=b(t);switch(n){case"<":return l<c?1:0;case"<=":return l<=c?1:0;case">":return l>c?1:0;case">=":return l>=c?1:0;case"==":return l===c?1:0;case"!=":return l!==c?1:0}}let a=v(e),o=v(t);switch(n){case"<":return a<o?1:0;case"<=":return a<=o?1:0;case">":return a>o?1:0;case">=":return a>=o?1:0;case"==":return a===o?1:0;case"!=":return a!==o?1:0}return 0}async function Ot(e,t){M(e,"unary expression evaluation");let n=await R(e,"unary operand evaluation",()=>E(e,t.operand));switch(t.operator){case"!":return P(n)?0:1;case"-":return-b(n);case"+":return+b(n);default:return n}}async function Lt(e,t,n){M(e,"function call evaluation");let r=Ge.get(t);if(r)return r(n,e,{evalExpr:a=>E(e,a)});let s=e.functions.get(t);return s?Tt(e,s,n):""}async function Tt(e,t,n){if(M(e,"user function call"),e.currentRecursionDepth++,e.currentRecursionDepth>e.maxRecursionDepth)throw e.currentRecursionDepth--,new y(`awk: recursion depth exceeded maximum (${e.maxRecursionDepth})`,"recursion",e.output);let r=Object.create(null);for(let l of t.params)r[l]=e.vars[l];let s=[];for(let l=0;l<t.params.length;l++){let c=t.params[l];if(l<n.length){let u=n[l];u.type==="variable"&&(e.arrayAliases.set(c,u.name),s.push(c));let f=await R(e,"user function argument evaluation",()=>E(e,u));e.vars[c]=f}else e.vars[c]=""}e.hasReturn=!1,e.returnValue=void 0;let a=He;a&&await R(e,"user function body execution",()=>a(e,t.body.statements));let o=e.returnValue??"";for(let l of t.params)r[l]!==void 0?e.vars[l]=r[l]:delete e.vars[l];for(let l of s)e.arrayAliases.delete(l);return e.hasReturn=!1,e.returnValue=void 0,e.currentRecursionDepth--,o}async function Pt(e,t){M(e,"assignment evaluation");let n=await R(e,"assignment value evaluation",()=>E(e,t.value)),r=t.target,s=t.operator,a;if(s==="=")a=n;else{let o;if(r.type==="field"){let u=Math.floor(b(await R(e,"assignment field index",()=>E(e,r.index))));o=re(e,u)}else if(r.type==="variable")o=le(e,r.name);else{let u=v(await R(e,"assignment array key",()=>E(e,r.key)));o=ue(e,r.array,u)}let l=b(o),c=b(n);switch(s){case"+=":a=l+c;break;case"-=":a=l-c;break;case"*=":a=l*c;break;case"/=":a=c!==0?l/c:0;break;case"%=":a=c!==0?l%c:0;break;case"^=":a=l**c;break;default:a=n}}if(r.type==="field"){let o=Math.floor(b(await R(e,"assignment target field index",()=>E(e,r.index))));ye(e,o,a)}else if(r.type==="variable")Q(e,r.name,a);else{let o=v(await R(e,"assignment target array key",()=>E(e,r.key)));Se(e,r.array,o,a)}return a}async function ce(e,t,n,r){M(e,"inc/dec evaluation");let s;if(t.type==="field"){let a=Math.floor(b(await R(e,"inc/dec field index",()=>E(e,t.index))));s=b(re(e,a)),ye(e,a,s+n)}else if(t.type==="variable")s=b(le(e,t.name)),Q(e,t.name,s+n);else{let a=v(await R(e,"inc/dec array key",()=>E(e,t.key)));s=b(ue(e,t.array,a)),Se(e,t.array,a,s+n)}return r?s+n:s}async function Mt(e,t){return ce(e,t,1,!0)}async function Ft(e,t){return ce(e,t,-1,!0)}async function xt(e,t){return ce(e,t,1,!1)}async function Dt(e,t){return ce(e,t,-1,!1)}async function _t(e,t,n){M(e,"in-expression evaluation");let r;if(t.type==="tuple"){e.coverage?.hit("awk:expr:tuple");let s=[];for(let a of t.elements)s.push(v(await R(e,"tuple key element evaluation",()=>E(e,a))));r=s.join(e.SUBSEP)}else r=v(await R(e,"in-expression key evaluation",()=>E(e,t)));return Be(e,n,r)?1:0}async function Gt(e,t,n,r){if(M(e,"getline evaluation"),r)return Bt(e,t,r);if(n)return Ut(e,t,n);if(!e.lines||e.lineIndex===void 0)return-1;let s=e.lineIndex+1;if(s>=e.lines.length)return 0;let a=e.lines[s];return t?Q(e,t,a):j(e,a),e.NR++,e.lineIndex=s,1}async function Bt(e,t,n){let r=e.exec;if(!r)return-1;M(e,"getline command source");let s=v(await R(e,"getline command expression",()=>E(e,n))),a=e.getlineCommandStreams.get(s);if(!a)try{let c=await R(e,"getline command exec",()=>r(s)),f=ne(c.stdout).split(`
6
+ `);f.length>0&&f[f.length-1]===""&&f.pop(),a={lines:f,index:-1},e.getlineCommandStreams.set(s,a)}catch(c){if(c instanceof H)throw c;return-1}let o=a.index+1;if(o>=a.lines.length)return 0;let l=a.lines[o];return a.index=o,t?Q(e,t,l):j(e,l),1}async function Ut(e,t,n){let r=e.fs;if(!r||!e.cwd)return-1;M(e,"getline file source");let s=v(await R(e,"getline filename evaluation",()=>E(e,n)));if(s==="/dev/null")return 0;let a=r.resolvePath(e.cwd,s),o=e.getlineFileStreams.get(a);if(!o)try{let f=(await R(e,"getline file read",()=>r.readFile(a))).split(`
7
+ `);f.length>0&&f[f.length-1]===""&&f.pop(),o={lines:f,index:-1},e.getlineFileStreams.set(a,o)}catch(u){if(u instanceof H)throw u;return-1}let l=o.index+1;if(l>=o.lines.length)return 0;let c=o.lines[l];return o.index=l,t?Q(e,t,c):j(e,c),1}async function $t(e,t){if(M(e,"tuple evaluation"),t.length===0)return"";for(let n=0;n<t.length-1;n++)await R(e,"tuple intermediate element",()=>E(e,t[n]));return R(e,"tuple final element",()=>E(e,t[t.length-1]))}We(Z);function Re(e){if(e.maxOutputSize>0&&e.output.length>e.maxOutputSize)throw new y(`awk: output size limit exceeded (${e.maxOutputSize} bytes)`,"string_length",e.output)}function x(e,t){U(e.requireDefenseContext,"awk",t)}function S(e,t,n){return $(e.requireDefenseContext,"awk",t,n)}async function Z(e,t){x(e,"block execution");for(let n of t)if(await S(e,"statement execution",()=>W(e,n)),Ht(e))break}function Ht(e){return e.shouldExit||e.shouldNext||e.shouldNextFile||e.loopBreak||e.loopContinue||e.hasReturn}async function W(e,t){switch(x(e,"single statement execution"),e.coverage?.hit(`awk:stmt:${t.type}`),t.type){case"block":await S(e,"nested block statement",()=>Z(e,t.statements));break;case"expr_stmt":await S(e,"expression statement",()=>E(e,t.expression));break;case"print":await S(e,"print statement",()=>Wt(e,t.args,t.output));break;case"printf":await S(e,"printf statement",()=>zt(e,t.format,t.args,t.output));break;case"if":await S(e,"if statement",()=>Vt(e,t));break;case"while":await S(e,"while statement",()=>Xt(e,t));break;case"do_while":await S(e,"do-while statement",()=>Kt(e,t));break;case"for":await S(e,"for statement",()=>qt(e,t));break;case"for_in":await S(e,"for-in statement",()=>jt(e,t));break;case"break":e.loopBreak=!0;break;case"continue":e.loopContinue=!0;break;case"next":e.shouldNext=!0;break;case"nextfile":e.shouldNextFile=!0;break;case"exit":e.shouldExit=!0;{let n=t.code;e.exitCode=n?Math.floor(b(await S(e,"exit code expression",()=>E(e,n)))):0}break;case"return":e.hasReturn=!0;{let n=t.value;e.returnValue=n?await S(e,"return expression",()=>E(e,n)):""}break;case"delete":await S(e,"delete statement",()=>Qt(e,t.target));break}}async function Wt(e,t,n){x(e,"print execution");let r=[];for(let a of t){let o=await S(e,"print argument evaluation",()=>E(e,a));typeof o=="number"?Number.isInteger(o)&&Math.abs(o)<Number.MAX_SAFE_INTEGER?r.push(String(o)):r.push(oe(e.OFMT,[o],e.maxOutputSize||void 0)):r.push(v(o))}let s=r.join(e.OFS)+e.ORS;n?await S(e,"print redirection write",()=>ze(e,n.redirect,n.file,s)):(e.output+=s,Re(e))}async function zt(e,t,n,r){x(e,"printf execution");let s=v(await S(e,"printf format evaluation",()=>E(e,t))),a=[];for(let c of n)a.push(await S(e,"printf argument evaluation",()=>E(e,c)));let o=e.maxOutputSize>0?Math.max(0,e.maxOutputSize-D(e.output)):void 0,l=oe(s,a,o);r?await S(e,"printf redirection write",()=>ze(e,r.redirect,r.file,l)):(e.output+=l,Re(e))}async function ze(e,t,n,r){x(e,"file write execution");let s=e.fs;if(!s||!e.cwd){e.output+=r,Re(e);return}let a=v(await S(e,"redirection filename evaluation",()=>E(e,n))),o=s.resolvePath(e.cwd,a);t===">"?e.openedFiles.has(o)?await S(e,"redirection append write",()=>s.appendFile(o,r)):(await S(e,"redirection overwrite write",()=>s.writeFile(o,r)),e.openedFiles.add(o)):(e.openedFiles.has(o)||e.openedFiles.add(o),await S(e,"redirection append mode write",()=>s.appendFile(o,r)))}async function Vt(e,t){if(x(e,"if execution"),P(await S(e,"if condition evaluation",()=>E(e,t.condition))))await S(e,"if consequent execution",()=>W(e,t.consequent));else if(t.alternate){let n=t.alternate;await S(e,"if alternate execution",()=>W(e,n))}}async function Xt(e,t){x(e,"while execution");let n=0;for(;P(await S(e,"while condition evaluation",()=>E(e,t.condition)));){if(n++,n>e.maxIterations)throw new y(`awk: while loop exceeded maximum iterations (${e.maxIterations})`,"iterations",e.output);if(e.loopContinue=!1,await S(e,"while body execution",()=>W(e,t.body)),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break}}async function Kt(e,t){x(e,"do-while execution");let n=0;do{if(n++,n>e.maxIterations)throw new y(`awk: do-while loop exceeded maximum iterations (${e.maxIterations})`,"iterations",e.output);if(e.loopContinue=!1,await S(e,"do-while body execution",()=>W(e,t.body)),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break}while(P(await S(e,"do-while condition evaluation",()=>E(e,t.condition))))}async function qt(e,t){x(e,"for execution");let n=t.init,r=t.condition,s=t.update;n&&await S(e,"for init evaluation",()=>E(e,n));let a=0;for(;!r||P(await S(e,"for condition evaluation",()=>E(e,r)));){if(a++,a>e.maxIterations)throw new y(`awk: for loop exceeded maximum iterations (${e.maxIterations})`,"iterations",e.output);if(e.loopContinue=!1,await S(e,"for body execution",()=>W(e,t.body)),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break;s&&await S(e,"for update evaluation",()=>E(e,s))}}async function jt(e,t){x(e,"for-in execution");let n=e.arrays[t.array];if(n)for(let r of Object.keys(n)){if(e.vars[t.variable]=r,e.loopContinue=!1,await S(e,"for-in body execution",()=>W(e,t.body)),e.loopBreak){e.loopBreak=!1;break}if(e.shouldExit||e.shouldNext||e.hasReturn)break}}async function Qt(e,t){if(x(e,"delete execution"),t.type==="array_access"){let n=v(await S(e,"delete key evaluation",()=>E(e,t.key)));Ue(e,t.array,n)}else t.type==="variable"&&$e(e,t.name)}var te=class{ctx;program=null;rangeStates=[];constructor(t){this.ctx=t}assertDefenseContext(t){U(this.ctx.requireDefenseContext,"awk",t)}withDefenseContext(t,n){return $(this.ctx.requireDefenseContext,"awk",t,n)}execute(t){this.assertDefenseContext("program initialization"),this.program=t,this.ctx.output="";for(let n of t.functions)this.ctx.functions.set(n.name,n);this.rangeStates=t.rules.map(()=>!1)}async executeBegin(){if(this.assertDefenseContext("BEGIN execution entry"),!!this.program){for(let t of this.program.rules)if(t.pattern?.type==="begin"&&(await this.withDefenseContext("BEGIN block execution",()=>Z(this.ctx,t.action.statements)),this.ctx.shouldExit))break}}async executeLine(t){if(this.assertDefenseContext("line execution entry"),!(!this.program||this.ctx.shouldExit)){if(this.ctx.recordsProcessed++,this.ctx.recordsProcessed>this.ctx.maxIterations)throw new y(`record limit exceeded (${this.ctx.maxIterations})`,"iterations");j(this.ctx,t),this.ctx.NR++,this.ctx.FNR++,this.ctx.shouldNext=!1;for(let n=0;n<this.program.rules.length&&!(this.ctx.shouldExit||this.ctx.shouldNext||this.ctx.shouldNextFile);n++){let r=this.program.rules[n];r.pattern?.type==="begin"||r.pattern?.type==="end"||await this.withDefenseContext("rule match",()=>this.matchesRule(r,n))&&await this.withDefenseContext("rule block execution",()=>Z(this.ctx,r.action.statements))}}}async executeEnd(){if(this.assertDefenseContext("END execution entry"),!!this.program&&!this.ctx.inEndBlock){this.ctx.inEndBlock=!0,this.ctx.shouldExit=!1;for(let t of this.program.rules)if(t.pattern?.type==="end"&&(await this.withDefenseContext("END block execution",()=>Z(this.ctx,t.action.statements)),this.ctx.shouldExit))break;this.ctx.inEndBlock=!1}}getOutput(){return this.ctx.output}getExitCode(){return this.ctx.exitCode}getContext(){return this.ctx}async matchesRule(t,n){this.assertDefenseContext("rule matching");let r=t.pattern;if(!r)return!0;switch(r.type){case"begin":case"end":return!1;case"regex_pattern":return J(r.pattern,this.ctx.line);case"expr_pattern":return P(await this.withDefenseContext("expression pattern evaluation",()=>E(this.ctx,r.expression)));case"range":{let s=await this.withDefenseContext("range start pattern",()=>this.matchPattern(r.start)),a=await this.withDefenseContext("range end pattern",()=>this.matchPattern(r.end));return this.rangeStates[n]?(a&&(this.rangeStates[n]=!1),!0):s?(this.rangeStates[n]=!0,a&&(this.rangeStates[n]=!1),!0):!1}default:return!1}}async matchPattern(t){switch(this.assertDefenseContext("pattern matching"),t.type){case"regex_pattern":return J(t.pattern,this.ctx.line);case"expr_pattern":return P(await this.withDefenseContext("nested expression pattern",()=>E(this.ctx,t.expression)));default:return!1}}};var i;(function(e){e.NUMBER="NUMBER",e.STRING="STRING",e.REGEX="REGEX",e.IDENT="IDENT",e.BEGIN="BEGIN",e.END="END",e.IF="IF",e.ELSE="ELSE",e.WHILE="WHILE",e.DO="DO",e.FOR="FOR",e.IN="IN",e.BREAK="BREAK",e.CONTINUE="CONTINUE",e.NEXT="NEXT",e.NEXTFILE="NEXTFILE",e.EXIT="EXIT",e.RETURN="RETURN",e.DELETE="DELETE",e.FUNCTION="FUNCTION",e.PRINT="PRINT",e.PRINTF="PRINTF",e.GETLINE="GETLINE",e.PLUS="PLUS",e.MINUS="MINUS",e.STAR="STAR",e.SLASH="SLASH",e.PERCENT="PERCENT",e.CARET="CARET",e.EQ="EQ",e.NE="NE",e.LT="LT",e.GT="GT",e.LE="LE",e.GE="GE",e.MATCH="MATCH",e.NOT_MATCH="NOT_MATCH",e.AND="AND",e.OR="OR",e.NOT="NOT",e.ASSIGN="ASSIGN",e.PLUS_ASSIGN="PLUS_ASSIGN",e.MINUS_ASSIGN="MINUS_ASSIGN",e.STAR_ASSIGN="STAR_ASSIGN",e.SLASH_ASSIGN="SLASH_ASSIGN",e.PERCENT_ASSIGN="PERCENT_ASSIGN",e.CARET_ASSIGN="CARET_ASSIGN",e.INCREMENT="INCREMENT",e.DECREMENT="DECREMENT",e.QUESTION="QUESTION",e.COLON="COLON",e.COMMA="COMMA",e.SEMICOLON="SEMICOLON",e.NEWLINE="NEWLINE",e.LPAREN="LPAREN",e.RPAREN="RPAREN",e.LBRACE="LBRACE",e.RBRACE="RBRACE",e.LBRACKET="LBRACKET",e.RBRACKET="RBRACKET",e.DOLLAR="DOLLAR",e.APPEND="APPEND",e.PIPE="PIPE",e.EOF="EOF"})(i||(i={}));var Zt=new Map([["BEGIN",i.BEGIN],["END",i.END],["if",i.IF],["else",i.ELSE],["while",i.WHILE],["do",i.DO],["for",i.FOR],["in",i.IN],["break",i.BREAK],["continue",i.CONTINUE],["next",i.NEXT],["nextfile",i.NEXTFILE],["exit",i.EXIT],["return",i.RETURN],["delete",i.DELETE],["function",i.FUNCTION],["print",i.PRINT],["printf",i.PRINTF],["getline",i.GETLINE]]);function Yt(e){return e.replace(/\[\[:space:\]\]/g,"[ \\t\\n\\r\\f\\v]").replace(/\[\[:blank:\]\]/g,"[ \\t]").replace(/\[\[:alpha:\]\]/g,"[a-zA-Z]").replace(/\[\[:digit:\]\]/g,"[0-9]").replace(/\[\[:alnum:\]\]/g,"[a-zA-Z0-9]").replace(/\[\[:upper:\]\]/g,"[A-Z]").replace(/\[\[:lower:\]\]/g,"[a-z]").replace(/\[\[:punct:\]\]/g,"[!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~]").replace(/\[\[:xdigit:\]\]/g,"[0-9A-Fa-f]").replace(/\[\[:graph:\]\]/g,"[!-~]").replace(/\[\[:print:\]\]/g,"[ -~]").replace(/\[\[:cntrl:\]\]/g,"[\\x00-\\x1f\\x7f]")}var Jt=new Set([i.COMMA,i.LBRACE,i.AND,i.OR,i.QUESTION,i.COLON,i.DO,i.ELSE,i.IF,i.WHILE]),he=class{maxTokens;input;pos=0;line=1;column=1;lastTokenType=null;constructor(t,n=1e5){this.maxTokens=n,this.input=t}tokenize(){let t=[];for(;this.pos<this.input.length;){let n=this.nextToken();if(n){if(t.length>=this.maxTokens)throw new y(`awk: token limit exceeded (${this.maxTokens})`,"array_elements");t.push(n),this.lastTokenType=n.type}}if(t.length>=this.maxTokens)throw new y(`awk: token limit exceeded (${this.maxTokens})`,"array_elements");return t.push(this.makeToken(i.EOF,"")),t}makeToken(t,n){return{type:t,value:n,line:this.line,column:this.column}}peek(t=0){return this.input[this.pos+t]||""}advance(){let t=this.input[this.pos++]||"";return t===`
8
+ `?(this.line++,this.column=1):this.column++,t}skipWhitespace(){for(;this.pos<this.input.length;){let t=this.peek();if(t===" "||t===" "||t==="\r")this.advance();else if(t==="\\")if(this.peek(1)===`
9
+ `)this.advance(),this.advance();else break;else if(t==="#")for(;this.pos<this.input.length&&this.peek()!==`
10
+ `;)this.advance();else break}}nextToken(){for(this.skipWhitespace();this.peek()===`
11
+ `&&this.lastTokenType!==null&&Jt.has(this.lastTokenType);)this.advance(),this.skipWhitespace();if(this.pos>=this.input.length)return null;let t=this.line,n=this.column,r=this.peek();return r===`
12
+ `?(this.advance(),{type:i.NEWLINE,value:`
13
+ `,line:t,column:n}):r==='"'?this.readString():r==="/"&&this.canBeRegex()?this.readRegex():this.isDigit(r)||r==="."&&this.isDigit(this.peek(1))?this.readNumber():this.isAlpha(r)||r==="_"?this.readIdentifier():this.readOperator()}canBeRegex(){return new Set([null,i.NEWLINE,i.SEMICOLON,i.LBRACE,i.RBRACE,i.LPAREN,i.LBRACKET,i.COMMA,i.ASSIGN,i.PLUS_ASSIGN,i.MINUS_ASSIGN,i.STAR_ASSIGN,i.SLASH_ASSIGN,i.PERCENT_ASSIGN,i.CARET_ASSIGN,i.AND,i.OR,i.NOT,i.MATCH,i.NOT_MATCH,i.QUESTION,i.COLON,i.LT,i.GT,i.LE,i.GE,i.EQ,i.NE,i.PLUS,i.MINUS,i.STAR,i.PERCENT,i.CARET,i.PRINT,i.PRINTF,i.IF,i.WHILE,i.DO,i.FOR,i.RETURN]).has(this.lastTokenType)}readString(){let t=this.line,n=this.column;this.advance();let r="";for(;this.pos<this.input.length&&this.peek()!=='"';)if(this.peek()==="\\"){this.advance();let s=this.advance();switch(s){case"n":r+=`
14
+ `;break;case"t":r+=" ";break;case"r":r+="\r";break;case"f":r+="\f";break;case"b":r+="\b";break;case"v":r+="\v";break;case"a":r+="\x07";break;case"\\":r+="\\";break;case'"':r+='"';break;case"/":r+="/";break;case"x":{let a="";for(;a.length<2&&/[0-9a-fA-F]/.test(this.peek());)a+=this.advance();a.length>0?r+=String.fromCharCode(parseInt(a,16)):r+="x";break}default:if(/[0-7]/.test(s)){let a=s;for(;a.length<3&&/[0-7]/.test(this.peek());)a+=this.advance();r+=String.fromCharCode(parseInt(a,8))}else r+=s}}else r+=this.advance();return this.peek()==='"'&&this.advance(),{type:i.STRING,value:r,line:t,column:n}}readRegex(){let t=this.line,n=this.column;this.advance();let r="";for(;this.pos<this.input.length&&this.peek()!=="/";)if(this.peek()==="\\")r+=this.advance(),this.pos<this.input.length&&(r+=this.advance());else{if(this.peek()===`
15
+ `)break;r+=this.advance()}return this.peek()==="/"&&this.advance(),r=Yt(r),{type:i.REGEX,value:r,line:t,column:n}}readNumber(){let t=this.line,n=this.column,r="";for(;this.isDigit(this.peek());)r+=this.advance();if(this.peek()==="."&&this.isDigit(this.peek(1)))for(r+=this.advance();this.isDigit(this.peek());)r+=this.advance();if(this.peek()==="e"||this.peek()==="E")for(r+=this.advance(),(this.peek()==="+"||this.peek()==="-")&&(r+=this.advance());this.isDigit(this.peek());)r+=this.advance();return{type:i.NUMBER,value:parseFloat(r),line:t,column:n}}readIdentifier(){let t=this.line,n=this.column,r="";for(;this.isAlphaNumeric(this.peek())||this.peek()==="_";)r+=this.advance();let s=Zt.get(r);return s!==void 0?{type:s,value:r,line:t,column:n}:{type:i.IDENT,value:r,line:t,column:n}}readOperator(){let t=this.line,n=this.column,r=this.advance(),s=this.peek();switch(r){case"+":return s==="+"?(this.advance(),{type:i.INCREMENT,value:"++",line:t,column:n}):s==="="?(this.advance(),{type:i.PLUS_ASSIGN,value:"+=",line:t,column:n}):{type:i.PLUS,value:"+",line:t,column:n};case"-":return s==="-"?(this.advance(),{type:i.DECREMENT,value:"--",line:t,column:n}):s==="="?(this.advance(),{type:i.MINUS_ASSIGN,value:"-=",line:t,column:n}):{type:i.MINUS,value:"-",line:t,column:n};case"*":return s==="*"?(this.advance(),{type:i.CARET,value:"**",line:t,column:n}):s==="="?(this.advance(),{type:i.STAR_ASSIGN,value:"*=",line:t,column:n}):{type:i.STAR,value:"*",line:t,column:n};case"/":return s==="="?(this.advance(),{type:i.SLASH_ASSIGN,value:"/=",line:t,column:n}):{type:i.SLASH,value:"/",line:t,column:n};case"%":return s==="="?(this.advance(),{type:i.PERCENT_ASSIGN,value:"%=",line:t,column:n}):{type:i.PERCENT,value:"%",line:t,column:n};case"^":return s==="="?(this.advance(),{type:i.CARET_ASSIGN,value:"^=",line:t,column:n}):{type:i.CARET,value:"^",line:t,column:n};case"=":return s==="="?(this.advance(),{type:i.EQ,value:"==",line:t,column:n}):{type:i.ASSIGN,value:"=",line:t,column:n};case"!":return s==="="?(this.advance(),{type:i.NE,value:"!=",line:t,column:n}):s==="~"?(this.advance(),{type:i.NOT_MATCH,value:"!~",line:t,column:n}):{type:i.NOT,value:"!",line:t,column:n};case"<":return s==="="?(this.advance(),{type:i.LE,value:"<=",line:t,column:n}):{type:i.LT,value:"<",line:t,column:n};case">":return s==="="?(this.advance(),{type:i.GE,value:">=",line:t,column:n}):s===">"?(this.advance(),{type:i.APPEND,value:">>",line:t,column:n}):{type:i.GT,value:">",line:t,column:n};case"&":return s==="&"?(this.advance(),{type:i.AND,value:"&&",line:t,column:n}):{type:i.IDENT,value:"&",line:t,column:n};case"|":return s==="|"?(this.advance(),{type:i.OR,value:"||",line:t,column:n}):{type:i.PIPE,value:"|",line:t,column:n};case"~":return{type:i.MATCH,value:"~",line:t,column:n};case"?":return{type:i.QUESTION,value:"?",line:t,column:n};case":":return{type:i.COLON,value:":",line:t,column:n};case",":return{type:i.COMMA,value:",",line:t,column:n};case";":return{type:i.SEMICOLON,value:";",line:t,column:n};case"(":return{type:i.LPAREN,value:"(",line:t,column:n};case")":return{type:i.RPAREN,value:")",line:t,column:n};case"{":return{type:i.LBRACE,value:"{",line:t,column:n};case"}":return{type:i.RBRACE,value:"}",line:t,column:n};case"[":return{type:i.LBRACKET,value:"[",line:t,column:n};case"]":return{type:i.RBRACKET,value:"]",line:t,column:n};case"$":return{type:i.DOLLAR,value:"$",line:t,column:n};default:return{type:i.IDENT,value:r,line:t,column:n}}}isDigit(t){return t>="0"&&t<="9"}isAlpha(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"}isAlphaNumeric(t){return this.isDigit(t)||this.isAlpha(t)}};var h={LPAREN:"LPAREN",RPAREN:"RPAREN",QUESTION:"QUESTION",NEWLINE:"NEWLINE",SEMICOLON:"SEMICOLON",RBRACE:"RBRACE",COMMA:"COMMA",PIPE:"PIPE",GT:"GT",APPEND:"APPEND",AND:"AND",OR:"OR",ASSIGN:"ASSIGN",PLUS_ASSIGN:"PLUS_ASSIGN",MINUS_ASSIGN:"MINUS_ASSIGN",STAR_ASSIGN:"STAR_ASSIGN",SLASH_ASSIGN:"SLASH_ASSIGN",PERCENT_ASSIGN:"PERCENT_ASSIGN",CARET_ASSIGN:"CARET_ASSIGN",RBRACKET:"RBRACKET",COLON:"COLON",IN:"IN",PRINT:"PRINT",PRINTF:"PRINTF",IDENT:"IDENT",LT:"LT",LE:"LE",GE:"GE",EQ:"EQ",NE:"NE",MATCH:"MATCH",NOT_MATCH:"NOT_MATCH",NUMBER:"NUMBER",STRING:"STRING",DOLLAR:"DOLLAR",NOT:"NOT",MINUS:"MINUS",PLUS:"PLUS",INCREMENT:"INCREMENT",DECREMENT:"DECREMENT"};function je(e){e.expect(h.PRINT);let t=[];if(e.check(h.NEWLINE)||e.check(h.SEMICOLON)||e.check(h.RBRACE)||e.check(h.PIPE)||e.check(h.GT)||e.check(h.APPEND))t.push({type:"field",index:{type:"number",value:0}});else for(e.assertArrayLength(t.length),t.push(pe(e));e.check(h.COMMA);)e.advance(),e.assertArrayLength(t.length),t.push(pe(e));let n;return e.check(h.GT)?(e.advance(),n={redirect:">",file:e.parsePrimary()}):e.check(h.APPEND)&&(e.advance(),n={redirect:">>",file:e.parsePrimary()}),{type:"print",args:t,output:n}}function pe(e){return en(e)?Ae(e,!0):Ae(e,!1)}function Ae(e,t){let n=t?e.parseTernary():tn(e);if(e.match(h.ASSIGN,h.PLUS_ASSIGN,h.MINUS_ASSIGN,h.STAR_ASSIGN,h.SLASH_ASSIGN,h.PERCENT_ASSIGN,h.CARET_ASSIGN)){let r=e.advance(),s=e.withDepth(()=>Ae(e,t));if(n.type!=="variable"&&n.type!=="field"&&n.type!=="array_access")throw new Error("Invalid assignment target");return{type:"assignment",operator:new Map([["=","="],["+=","+="],["-=","-="],["*=","*="],["/=","/="],["%=","%="],["^=","^="]]).get(r.value)??"=",target:n,value:s}}return n}function en(e){let t=0,n=e.pos;for(;n<e.tokens.length;){e.useOperation();let r=e.tokens[n];if(r.type===h.LPAREN&&t++,r.type===h.RPAREN&&t--,r.type===h.QUESTION&&t===0)return!0;if(r.type===h.NEWLINE||r.type===h.SEMICOLON||r.type===h.RBRACE||r.type===h.COMMA||r.type===h.PIPE)return!1;n++}return!1}function tn(e){let t=Ve(e);for(;e.check(h.OR);){e.advance();let n=Ve(e);t={type:"binary",operator:"||",left:t,right:n}}return t}function Ve(e){let t=Xe(e);for(;e.check(h.AND);){e.advance();let n=Xe(e);t={type:"binary",operator:"&&",left:t,right:n}}return t}function Xe(e){let t=nn(e);if(e.check(h.IN)){e.advance();let n=String(e.expect(h.IDENT).value);return{type:"in",key:t,array:n}}return t}function nn(e){let t=Ke(e);for(;rn(e)&&!sn(e);){let n=Ke(e);t={type:"binary",operator:" ",left:t,right:n}}return t}function Ke(e){let t=qe(e);for(;e.match(h.MATCH,h.NOT_MATCH);){let n=e.advance().type===h.MATCH?"~":"!~",r=qe(e);t={type:"binary",operator:n,left:t,right:r}}return t}function qe(e){let t=e.parseAddSub();for(;e.match(h.LT,h.LE,h.GE,h.EQ,h.NE);){let n=e.advance(),r=e.parseAddSub();t={type:"binary",operator:new Map([["<","<"],["<=","<="],[">=",">="],["==","=="],["!=","!="]]).get(n.value)??"==",left:t,right:r}}return t}function rn(e){return e.match(h.NUMBER,h.STRING,h.IDENT,h.DOLLAR,h.LPAREN,h.NOT,h.MINUS,h.PLUS,h.INCREMENT,h.DECREMENT)}function sn(e){return e.match(h.AND,h.OR,h.QUESTION,h.ASSIGN,h.PLUS_ASSIGN,h.MINUS_ASSIGN,h.STAR_ASSIGN,h.SLASH_ASSIGN,h.PERCENT_ASSIGN,h.CARET_ASSIGN,h.COMMA,h.SEMICOLON,h.NEWLINE,h.RBRACE,h.RPAREN,h.RBRACKET,h.COLON,h.PIPE,h.APPEND,h.GT,h.IN)}function Qe(e){e.expect(h.PRINTF);let t=e.check(h.LPAREN);t&&(e.advance(),e.skipNewlines());let n=t?e.parseExpression():pe(e),r=[];for(;e.check(h.COMMA);)e.advance(),t&&e.skipNewlines(),e.assertArrayLength(r.length),r.push(t?e.parseExpression():pe(e));t&&(e.skipNewlines(),e.expect(h.RPAREN));let s;return e.check(h.GT)?(e.advance(),s={redirect:">",file:e.parsePrimary()}):e.check(h.APPEND)&&(e.advance(),s={redirect:">>",file:e.parsePrimary()}),{type:"printf",format:n,args:r,output:s}}var fe=class{tokens=[];pos=0;depth=0;operations=0;limits;constructor(t={}){this.limits={maxSourceLength:t.maxSourceLength??10*1024*1024,maxTokens:t.maxTokens??1e5,maxDepth:t.maxDepth??100,maxOperations:t.maxOperations??1e5}}parse(t){if(t.length>this.limits.maxSourceLength)throw new y(`awk: source length limit exceeded (${this.limits.maxSourceLength})`,"string_length");let n=new he(t,this.limits.maxTokens);this.tokens=n.tokenize(),this.pos=0,this.depth=0,this.operations=0;let r=0;for(let s of this.tokens)if(this.useOperation(),s.type===i.LPAREN||s.type===i.LBRACKET||s.type===i.LBRACE){if(r++,r>this.limits.maxDepth)throw new y(`awk: parser depth limit exceeded (${this.limits.maxDepth})`,"recursion")}else(s.type===i.RPAREN||s.type===i.RBRACKET||s.type===i.RBRACE)&&(r=Math.max(0,r-1));return this.parseProgram()}setPos(t){this.pos=t}current(){return this.tokens[this.pos]||{type:i.EOF,value:"",line:0,column:0}}advance(){this.useOperation();let t=this.current();return this.pos<this.tokens.length&&this.pos++,t}useOperation(t=1){if(t>this.limits.maxOperations-this.operations)throw new y(`awk: parser operation limit exceeded (${this.limits.maxOperations})`,"iterations");this.operations+=t}withDepth(t){if(this.depth>=this.limits.maxDepth)throw new y(`awk: parser depth limit exceeded (${this.limits.maxDepth})`,"recursion");this.depth++;try{return t()}finally{this.depth--}}assertArrayLength(t){if(t>=this.limits.maxTokens)throw new y(`awk: AST array limit exceeded (${this.limits.maxTokens})`,"array_elements")}match(...t){return t.includes(this.current().type)}check(t){return this.current().type===t}expect(t,n){if(!this.check(t)){let r=this.current();throw new Error(n||`Expected ${t}, got ${r.type} at line ${r.line}:${r.column}`)}return this.advance()}skipNewlines(){for(;this.check(i.NEWLINE);)this.advance()}skipTerminators(){for(;this.check(i.NEWLINE)||this.check(i.SEMICOLON);)this.advance()}parseProgram(){let t=[],n=[];for(this.skipNewlines();!this.check(i.EOF)&&(this.skipNewlines(),!this.check(i.EOF));)this.check(i.FUNCTION)?t.push(this.parseFunction()):n.push(this.parseRule()),this.skipTerminators();return{functions:t,rules:n}}parseFunction(){this.expect(i.FUNCTION);let t=this.expect(i.IDENT).value;this.expect(i.LPAREN);let n=[];if(!this.check(i.RPAREN))for(n.push(this.expect(i.IDENT).value);this.check(i.COMMA);)this.advance(),n.push(this.expect(i.IDENT).value);this.expect(i.RPAREN),this.skipNewlines();let r=this.parseBlock();return{name:t,params:n,body:r}}parseRule(){let t;if(this.check(i.BEGIN))this.advance(),t={type:"begin"};else if(this.check(i.END))this.advance(),t={type:"end"};else if(this.check(i.LBRACE))t=void 0;else if(this.check(i.REGEX)){let r=this.advance();if(this.check(i.AND)||this.check(i.OR)){let s={type:"binary",operator:"~",left:{type:"field",index:{type:"number",value:0}},right:{type:"regex",pattern:r.value}};t={type:"expr_pattern",expression:this.parseLogicalOrRest(s)}}else{let s={type:"regex_pattern",pattern:r.value};if(this.check(i.COMMA)){this.advance();let a;this.check(i.REGEX)?a={type:"regex_pattern",pattern:this.advance().value}:a={type:"expr_pattern",expression:this.parseExpression()},t={type:"range",start:s,end:a}}else t=s}}else{let s={type:"expr_pattern",expression:this.parseExpression()};if(this.check(i.COMMA)){this.advance();let a;this.check(i.REGEX)?a={type:"regex_pattern",pattern:this.advance().value}:a={type:"expr_pattern",expression:this.parseExpression()},t={type:"range",start:s,end:a}}else t=s}this.skipNewlines();let n;return this.check(i.LBRACE)?n=this.parseBlock():n={type:"block",statements:[{type:"print",args:[{type:"field",index:{type:"number",value:0}}]}]},{pattern:t,action:n}}parseBlock(){this.expect(i.LBRACE),this.skipNewlines();let t=[];for(;!this.check(i.RBRACE)&&!this.check(i.EOF);)t.push(this.parseStatement()),this.skipTerminators();return this.expect(i.RBRACE),{type:"block",statements:t}}parseStatement(){return this.withDepth(()=>this.parseStatementAtDepth())}parseStatementAtDepth(){if(this.check(i.SEMICOLON)||this.check(i.NEWLINE))return this.advance(),{type:"block",statements:[]};if(this.check(i.LBRACE))return this.parseBlock();if(this.check(i.IF))return this.parseIf();if(this.check(i.WHILE))return this.parseWhile();if(this.check(i.DO))return this.parseDoWhile();if(this.check(i.FOR))return this.parseFor();if(this.check(i.BREAK))return this.advance(),{type:"break"};if(this.check(i.CONTINUE))return this.advance(),{type:"continue"};if(this.check(i.NEXT))return this.advance(),{type:"next"};if(this.check(i.NEXTFILE))return this.advance(),{type:"nextfile"};if(this.check(i.EXIT)){this.advance();let n;return!this.check(i.NEWLINE)&&!this.check(i.SEMICOLON)&&!this.check(i.RBRACE)&&!this.check(i.EOF)&&(n=this.parseExpression()),{type:"exit",code:n}}if(this.check(i.RETURN)){this.advance();let n;return!this.check(i.NEWLINE)&&!this.check(i.SEMICOLON)&&!this.check(i.RBRACE)&&!this.check(i.EOF)&&(n=this.parseExpression()),{type:"return",value:n}}if(this.check(i.DELETE)){this.advance();let n=this.parsePrimary();if(n.type!=="array_access"&&n.type!=="variable")throw new Error("delete requires array element or array");return{type:"delete",target:n}}return this.check(i.PRINT)?je(this):this.check(i.PRINTF)?Qe(this):{type:"expr_stmt",expression:this.parseExpression()}}parseIf(){this.expect(i.IF),this.expect(i.LPAREN);let t=this.parseExpression();this.expect(i.RPAREN),this.skipNewlines();let n=this.parseStatement();this.skipTerminators();let r;return this.check(i.ELSE)&&(this.advance(),this.skipNewlines(),r=this.parseStatement()),{type:"if",condition:t,consequent:n,alternate:r}}parseWhile(){this.expect(i.WHILE),this.expect(i.LPAREN);let t=this.parseExpression();this.expect(i.RPAREN),this.skipNewlines();let n=this.parseStatement();return{type:"while",condition:t,body:n}}parseDoWhile(){this.expect(i.DO),this.skipNewlines();let t=this.parseStatement();this.skipNewlines(),this.expect(i.WHILE),this.expect(i.LPAREN);let n=this.parseExpression();return this.expect(i.RPAREN),{type:"do_while",body:t,condition:n}}parseFor(){if(this.expect(i.FOR),this.expect(i.LPAREN),this.check(i.IDENT)){let a=this.advance();if(this.check(i.IN)){this.advance();let o=this.expect(i.IDENT).value;this.expect(i.RPAREN),this.skipNewlines();let l=this.parseStatement();return{type:"for_in",variable:a.value,array:o,body:l}}this.pos--}let t;this.check(i.SEMICOLON)||(t=this.parseExpression()),this.expect(i.SEMICOLON);let n;this.check(i.SEMICOLON)||(n=this.parseExpression()),this.expect(i.SEMICOLON);let r;this.check(i.RPAREN)||(r=this.parseExpression()),this.expect(i.RPAREN),this.skipNewlines();let s=this.parseStatement();return{type:"for",init:t,condition:n,update:r,body:s}}parseExpression(){return this.withDepth(()=>this.parseAssignment())}parseAssignment(){let t=this.parseTernary();if(this.match(i.ASSIGN,i.PLUS_ASSIGN,i.MINUS_ASSIGN,i.STAR_ASSIGN,i.SLASH_ASSIGN,i.PERCENT_ASSIGN,i.CARET_ASSIGN)){let n=this.advance(),r=this.parseExpression();if(t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access")throw new Error("Invalid assignment target");let s=new Set(["=","+=","-=","*=","/=","%=","^="]),a=n.value;if(!s.has(a))throw new Error(`Unknown assignment operator: ${a}`);return{type:"assignment",operator:a,target:t,value:r}}return t}parseTernary(){let t=this.parsePipeGetline();if(this.check(i.QUESTION)){this.advance();let n=this.parseExpression();this.expect(i.COLON);let r=this.parseExpression();t={type:"ternary",condition:t,consequent:n,alternate:r}}return t}parsePipeGetline(){let t=this.parseOr();if(this.check(i.PIPE)){if(this.advance(),!this.check(i.GETLINE))throw new Error("Expected 'getline' after '|' in expression context");this.advance();let n;return this.check(i.IDENT)&&(n=this.advance().value),{type:"getline",command:t,variable:n}}return t}parseOr(){let t=this.parseAnd();for(;this.check(i.OR);){this.advance();let n=this.parseAnd();t={type:"binary",operator:"||",left:t,right:n}}return t}parseLogicalOrRest(t){for(t=this.parseLogicalAndRest(t);this.check(i.OR);){this.advance();let n=this.parseAnd();t={type:"binary",operator:"||",left:t,right:n}}return t}parseLogicalAndRest(t){for(;this.check(i.AND);){this.advance();let n=this.parseIn();t={type:"binary",operator:"&&",left:t,right:n}}return t}parseAnd(){let t=this.parseIn();for(;this.check(i.AND);){this.advance();let n=this.parseIn();t={type:"binary",operator:"&&",left:t,right:n}}return t}parseIn(){let t=this.parseConcatenation();if(this.check(i.IN)){this.advance();let n=this.expect(i.IDENT).value;return{type:"in",key:t,array:n}}return t}parseConcatenation(){let t=this.parseMatch();for(;this.canStartExpression()&&!this.isConcatTerminator();){let n=this.parseMatch();t={type:"binary",operator:" ",left:t,right:n}}return t}parseMatch(){let t=this.parseComparison();for(;this.match(i.MATCH,i.NOT_MATCH);){let n=this.advance().type===i.MATCH?"~":"!~",r=this.parseComparison();t={type:"binary",operator:n,left:t,right:r}}return t}parseComparison(){let t=this.parseAddSub();for(;this.match(i.LT,i.LE,i.GT,i.GE,i.EQ,i.NE);){let n=this.advance(),r=this.parseAddSub();t={type:"binary",operator:new Map([["<","<"],["<=","<="],[">",">"],[">=",">="],["==","=="],["!=","!="]]).get(n.value)??"==",left:t,right:r}}return t}canStartExpression(){return this.match(i.NUMBER,i.STRING,i.IDENT,i.DOLLAR,i.LPAREN,i.NOT,i.MINUS,i.PLUS,i.INCREMENT,i.DECREMENT)}isConcatTerminator(){return this.match(i.AND,i.OR,i.QUESTION,i.ASSIGN,i.PLUS_ASSIGN,i.MINUS_ASSIGN,i.STAR_ASSIGN,i.SLASH_ASSIGN,i.PERCENT_ASSIGN,i.CARET_ASSIGN,i.COMMA,i.SEMICOLON,i.NEWLINE,i.RBRACE,i.RPAREN,i.RBRACKET,i.COLON,i.PIPE,i.APPEND,i.IN)}parseAddSub(){let t=this.parseMulDiv();for(;this.match(i.PLUS,i.MINUS);){let n=this.advance().value,r=this.parseMulDiv();t={type:"binary",operator:n,left:t,right:r}}return t}parseMulDiv(){let t=this.parseUnary();for(;this.match(i.STAR,i.SLASH,i.PERCENT);){let n=this.advance(),r=this.parseUnary();t={type:"binary",operator:new Map([["*","*"],["/","/"],["%","%"]]).get(n.value)??"*",left:t,right:r}}return t}parseUnary(){if(this.check(i.INCREMENT)){this.advance();let t=this.withDepth(()=>this.parseUnary());return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"+",operand:{type:"unary",operator:"+",operand:t}}:{type:"pre_increment",operand:t}}if(this.check(i.DECREMENT)){this.advance();let t=this.withDepth(()=>this.parseUnary());return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"-",operand:{type:"unary",operator:"-",operand:t}}:{type:"pre_decrement",operand:t}}if(this.match(i.NOT,i.MINUS,i.PLUS)){let t=this.advance().value,n=this.withDepth(()=>this.parseUnary());return{type:"unary",operator:t,operand:n}}return this.parsePower()}parsePower(){let t=this.parsePostfix();if(this.check(i.CARET)){this.advance();let n=this.withDepth(()=>this.parsePower());t={type:"binary",operator:"^",left:t,right:n}}return t}parsePostfix(){let t=this.parsePrimary();if(this.check(i.INCREMENT)){if(this.advance(),t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access")throw new Error("Invalid increment operand");return{type:"post_increment",operand:t}}if(this.check(i.DECREMENT)){if(this.advance(),t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access")throw new Error("Invalid decrement operand");return{type:"post_decrement",operand:t}}return t}parseFieldIndex(){if(this.check(i.INCREMENT)){this.advance();let t=this.withDepth(()=>this.parseFieldIndex());return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"+",operand:{type:"unary",operator:"+",operand:t}}:{type:"pre_increment",operand:t}}if(this.check(i.DECREMENT)){this.advance();let t=this.withDepth(()=>this.parseFieldIndex());return t.type!=="variable"&&t.type!=="field"&&t.type!=="array_access"?{type:"unary",operator:"-",operand:{type:"unary",operator:"-",operand:t}}:{type:"pre_decrement",operand:t}}if(this.match(i.NOT,i.MINUS,i.PLUS)){let t=this.advance().value,n=this.withDepth(()=>this.parseFieldIndex());return{type:"unary",operator:t,operand:n}}return this.parseFieldIndexPower()}parseFieldIndexPower(){let t=this.parseFieldIndexPrimary();if(this.check(i.CARET)){this.advance();let n=this.withDepth(()=>this.parseFieldIndexPower());t={type:"binary",operator:"^",left:t,right:n}}return t}parseFieldIndexPrimary(){if(this.check(i.NUMBER))return{type:"number",value:this.advance().value};if(this.check(i.STRING))return{type:"string",value:this.advance().value};if(this.check(i.DOLLAR))return this.advance(),{type:"field",index:this.parseFieldIndex()};if(this.check(i.LPAREN)){this.advance();let t=this.parseExpression();return this.expect(i.RPAREN),t}if(this.check(i.IDENT)){let t=this.advance().value;if(this.check(i.LPAREN)){this.advance();let n=[];if(!this.check(i.RPAREN))for(n.push(this.parseExpression());this.check(i.COMMA);)this.advance(),n.push(this.parseExpression());return this.expect(i.RPAREN),{type:"call",name:t,args:n}}if(this.check(i.LBRACKET)){this.advance();let n=this.parseExpression();if(this.check(i.COMMA)){let r=[n];for(;this.check(i.COMMA);)this.advance(),r.push(this.parseExpression());this.expect(i.RBRACKET);let s=r.reduce((a,o)=>({type:"binary",operator:" ",left:{type:"binary",operator:" ",left:a,right:{type:"variable",name:"SUBSEP"}},right:o}));return{type:"array_access",array:t,key:s}}return this.expect(i.RBRACKET),{type:"array_access",array:t,key:n}}return{type:"variable",name:t}}throw new Error(`Unexpected token in field index: ${this.current().type} at line ${this.current().line}:${this.current().column}`)}parsePrimary(){if(this.check(i.NUMBER))return{type:"number",value:this.advance().value};if(this.check(i.STRING))return{type:"string",value:this.advance().value};if(this.check(i.REGEX))return{type:"regex",pattern:this.advance().value};if(this.check(i.DOLLAR))return this.advance(),{type:"field",index:this.parseFieldIndex()};if(this.check(i.LPAREN)){this.advance();let t=this.parseExpression();if(this.check(i.COMMA)){let n=[t];for(;this.check(i.COMMA);)this.advance(),n.push(this.parseExpression());return this.expect(i.RPAREN),{type:"tuple",elements:n}}return this.expect(i.RPAREN),t}if(this.check(i.GETLINE)){this.advance();let t,n;return this.check(i.IDENT)&&(t=this.advance().value),this.check(i.LT)&&(this.advance(),n=this.parsePrimary()),{type:"getline",variable:t,file:n}}if(this.check(i.IDENT)){let t=this.advance().value;if(this.check(i.LPAREN)){this.advance();let n=[];if(this.skipNewlines(),!this.check(i.RPAREN))for(n.push(this.parseExpression());this.check(i.COMMA);)this.advance(),this.skipNewlines(),n.push(this.parseExpression());return this.skipNewlines(),this.expect(i.RPAREN),{type:"call",name:t,args:n}}if(this.check(i.LBRACKET)){this.advance();let n=[this.parseExpression()];for(;this.check(i.COMMA);)this.advance(),n.push(this.parseExpression());this.expect(i.RBRACKET);let r;if(n.length===1)r=n[0];else{r=n[0];for(let s=1;s<n.length;s++)r={type:"binary",operator:" ",left:{type:"binary",operator:" ",left:r,right:{type:"variable",name:"SUBSEP"}},right:n[s]}}return{type:"array_access",array:t,key:r}}return{type:"variable",name:t}}throw new Error(`Unexpected token: ${this.current().type} at line ${this.current().line}:${this.current().column}`)}};var an={name:"awk",summary:"pattern scanning and text processing language",usage:"awk [OPTIONS] 'PROGRAM' [FILE...]",options:["-F FS use FS as field separator","-v VAR=VAL assign VAL to variable VAR"," --help display this help and exit"]},Ri={name:"awk",async execute(e,t){U(t.requireDefenseContext,"awk","execution entry");let n=(m,w)=>$(t.requireDefenseContext,"awk",m,w);if(Ie(e))return ke(an);let r=new X(/\s+/),s=" ",a=Object.create(null),o=0;for(let m=0;m<e.length;m++){let w=e[m];if(w==="-F"&&m+1<e.length)s=ve(e[++m]),r=Ze(s),o=m+1;else if(w.startsWith("-F"))s=ve(w.slice(2)),r=Ze(s),o=m+1;else if(w==="-v"&&m+1<e.length){let p=e[++m],N=p.indexOf("=");if(N>0){let g=p.slice(0,N),d=ve(p.slice(N+1));a[g]=d}o=m+1}else{if(w.startsWith("--"))return Ee("awk",w);if(w.startsWith("-")&&w.length>1){let p=w[1];if(p!=="F"&&p!=="v")return Ee("awk",`-${p}`);o=m+1}else if(!w.startsWith("-")){o=m;break}}}if(o>=e.length)return{stdout:"",stderr:`awk: missing program
16
+ `,exitCode:1};let l=e[o],c=e.slice(o+1),u=new fe({maxSourceLength:t.limits.maxStringLength,maxTokens:t.limits.maxAwkParserTokens,maxDepth:t.limits.maxAwkParserDepth,maxOperations:t.limits.maxAwkParserOperations}),f;try{f=u.parse(l)}catch(m){return V(m),{stdout:"",stderr:`awk: ${m instanceof Error?m.message:String(m)}
17
+ `,exitCode:1}}let I={readFile:t.fs.readFile.bind(t.fs),writeFile:t.fs.writeFile.bind(t.fs),appendFile:async(m,w)=>{try{let p=await n("appendFile read",()=>t.fs.readFile(m));await n("appendFile write",()=>t.fs.writeFile(m,p+w))}catch(p){if(p instanceof H)throw p;await n("appendFile create",()=>t.fs.writeFile(m,w))}},resolvePath:t.fs.resolvePath.bind(t.fs)},C=t.exec,A=me({fieldSep:r,maxIterations:t.limits.maxAwkIterations,maxOutputSize:Math.min(t.limits.maxStringLength,t.limits.maxOutputSize),maxArrayElements:t.limits.maxArrayElements,fs:I,cwd:t.cwd,exec:C?m=>n("command pipe exec",()=>C(m,{cwd:t.cwd,signal:t.signal})):void 0,coverage:t.coverage,requireDefenseContext:t.requireDefenseContext});A.FS=s,A.vars=Object.assign(Object.create(null),a),A.ARGC=c.length+1,A.ARGV=Object.create(null),A.ARGV[0]="awk";for(let m=0;m<c.length;m++)A.ARGV[String(m+1)]=c[m];A.ENVIRON=be(t.env);let T=new te(A);T.execute(f);let de=f.rules.some(m=>m.pattern?.type!=="begin"&&m.pattern?.type!=="end"),z=f.rules.some(m=>m.pattern?.type==="end");try{if(await n("BEGIN execution",()=>T.executeBegin()),A.shouldExit)return await n("END execution after BEGIN exit",()=>T.executeEnd()),{stdout:T.getOutput(),stderr:"",exitCode:T.getExitCode()};if(!de&&!z)return{stdout:T.getOutput(),stderr:"",exitCode:T.getExitCode()};let m=Math.min(t.limits.maxInputBytes,t.limits.maxStringLength),w=t.limits.maxArrayElements,p=0,N=async(g,d)=>{let k=D(d);if(k>m-p)throw new y(`aggregate input size limit exceeded (${m} bytes)`,"string_length");p+=k;let _=d.length>0?1:0;for(let Y=0;Y<d.length;Y++)if(d.charCodeAt(Y)===10&&_++,_>w+1)throw new y(`record array limit exceeded (${w})`,"array_elements");let B=d.split(`
18
+ `);if(B.length>0&&B[B.length-1]===""&&B.pop(),B.length>w)throw new y(`record array limit exceeded (${w})`,"array_elements");for(A.FILENAME=g,A.FNR=0,A.lines=B,A.lineIndex=-1,A.shouldNextFile=!1;A.lineIndex<B.length-1;){A.lineIndex++;let Y=A.lineIndex;if(await n("line execution",()=>T.executeLine(B[Y])),A.shouldExit||A.shouldNextFile)break}};if(c.length>0)for(let g of c){let d;try{let k=t.fs.resolvePath(t.cwd,g);if((await n("input file stat",()=>t.fs.stat(k))).size>m-p)throw new y(`aggregate input size limit exceeded (${m} bytes)`,"string_length");d=await n("input file read",()=>t.fs.readFile(k))}catch(k){if(k instanceof H||k instanceof y)throw k;return{stdout:"",stderr:`awk: ${g}: No such file or directory
19
+ `,exitCode:1}}if(await n("input processing",()=>N(g,d)),A.shouldExit)break}else await n("stdin processing",()=>N("",ne(t.stdin)));return await n("END execution",()=>T.executeEnd()),{stdout:T.getOutput(),stderr:"",exitCode:T.getExitCode()}}catch(m){if(m instanceof H)throw m;let w=m instanceof Error?m.message:String(m),p=m instanceof y?y.EXIT_CODE:2;return{stdout:T.getOutput(),stderr:`awk: ${w}
20
+ `,exitCode:p}}}};function ve(e){return e.replace(/\\t/g," ").replace(/\\n/g,`
21
+ `).replace(/\\r/g,"\r").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\a/g,"\x07").replace(/\\v/g,"\v").replace(/\\\\/g,"\\")}function Ze(e){if(e===" ")return O("\\s+");if(/[[\](){}.*+?^$|\\]/.test(e))try{return O(e)}catch{return O(Ye(e))}return O(Ye(e))}function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Ai={name:"awk",flags:[{flag:"-F",type:"value",valueHint:"delimiter"},{flag:"-v",type:"value",valueHint:"string"}],stdinType:"text",needsArgs:!0};export{Ri as a,Ai as b};
@@ -0,0 +1,14 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{l as m,m as d}from"./chunk-IQGNPH54.js";import{a as p,b as x,c as y}from"./chunk-QAYAQNCG.js";var L={name:"strings",summary:"print the sequences of printable characters in files",usage:"strings [OPTION]... [FILE]...",description:"For each FILE, print the printable character sequences that are at least MIN characters long. If no FILE is specified, standard input is read.",options:["-n MIN Print sequences of at least MIN characters (default: 4)","-t FORMAT Print offset before each string (o=octal, x=hex, d=decimal)","-a Scan the entire file (default behavior)","-e ENCODING Select character encoding (s=7-bit, S=8-bit)"],examples:["strings file.bin # Extract strings (min 4 chars)","strings -n 8 file.bin # Extract strings (min 8 chars)","strings -t x file.bin # Show hex offset","echo 'hello' | strings # Read from stdin"]};function N(i){return i>=32&&i<=126||i===9}function S(i,s){if(s===null)return"";switch(s){case"o":return`${i.toString(8).padStart(7," ")} `;case"x":return`${i.toString(16).padStart(7," ")} `;case"d":return`${i.toString(10).padStart(7," ")} `;default:return s}}function $(i,s,n,f=!1,r){let u=[],a=0,l=0,t=typeof i=="string"&&!f?new TextEncoder().encode(i):i;if(t.length>n.maxStringLength-n.inputBytes)throw new m(`strings: aggregate input size limit exceeded (${n.maxStringLength} bytes)`,"string_length");n.inputBytes+=t.length;let e=new TextDecoder,g=(o,c)=>typeof t=="string"?t.slice(o,c):e.decode(t.subarray(o,c)),h=o=>{if(++n.iterations>n.maxIterations)throw new m(`strings: iteration limit exceeded (${n.maxIterations})`,"iterations");if(n.resultCount>=n.maxArrayElements)throw new m(`strings: array element limit exceeded (${n.maxArrayElements})`,"array_elements");let c=o.length+1;if(c>n.maxOutputSize-n.outputBytes)throw new m(`strings: output size limit exceeded (${n.maxOutputSize} bytes)`,"output_size");u.push(o),n.resultCount++,n.outputBytes+=c};for(let o=0;o<t.length;o++){if((o&4095)===0&&r?.aborted)throw new d;let c=typeof t=="string"?t.charCodeAt(o)&255:t[o];if(N(c)){if(a===0&&(l=o),a>=n.maxStringLength)throw new m(`strings: string length limit exceeded (${n.maxStringLength} bytes)`,"string_length");a++}else{if(a>=s.minLength){let w=S(l,s.offsetFormat);h(`${w}${g(l,o)}`)}a=0}}if(a>=s.minLength){let o=S(l,s.offsetFormat);h(`${o}${g(l,t.length)}`)}return u}var E={name:"strings",execute:async(i,s)=>{if(x(i))return p(L);let n={minLength:4,offsetFormat:null},f=[],r=0;for(;r<i.length;){let t=i[r];if(t==="-n"&&r+1<i.length){let e=Number.parseInt(i[r+1],10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:"",stderr:`strings: invalid minimum string length: '${i[r+1]}'
3
+ `};n.minLength=e,r+=2}else if(t.match(/^-n\d+$/)){let e=Number.parseInt(t.slice(2),10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:"",stderr:`strings: invalid minimum string length: '${t.slice(2)}'
4
+ `};n.minLength=e,r++}else if(t.match(/^-\d+$/)){let e=Number.parseInt(t.slice(1),10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:"",stderr:`strings: invalid minimum string length: '${t.slice(1)}'
5
+ `};n.minLength=e,r++}else if(t==="-t"&&r+1<i.length){let e=i[r+1];if(e!=="o"&&e!=="x"&&e!=="d")return{exitCode:1,stdout:"",stderr:`strings: invalid radix: '${e}'
6
+ `};n.offsetFormat=e,r+=2}else if(t.startsWith("-t")&&t.length===3){let e=t[2];if(e!=="o"&&e!=="x"&&e!=="d")return{exitCode:1,stdout:"",stderr:`strings: invalid radix: '${e}'
7
+ `};n.offsetFormat=e,r++}else if(t==="-a"||t==="--all"||t==="-")t==="-"&&f.push(t),r++;else if(t==="-e"&&r+1<i.length){let e=i[r+1];if(e!=="s"&&e!=="S")return{exitCode:1,stdout:"",stderr:`strings: invalid encoding: '${e}'
8
+ `};r+=2}else if(t.startsWith("-e")&&t.length===3){let e=t[2];if(e!=="s"&&e!=="S")return{exitCode:1,stdout:"",stderr:`strings: invalid encoding: '${e}'
9
+ `};r++}else if(t==="--"){f.push(...i.slice(r+1));break}else{if(t.startsWith("-")&&t!=="-")return y("strings",t);f.push(t),r++}}let u="",a={maxArrayElements:s.limits.maxArrayElements,maxIterations:s.limits.maxLoopIterations,maxStringLength:Math.min(s.limits.maxInputBytes,s.limits.maxStringLength),maxOutputSize:Math.min(s.limits.maxOutputSize,s.limits.maxStringLength),iterations:0,inputBytes:0,resultCount:0,outputBytes:0},l=()=>s.stdin;if(f.length===0){let t=$(l(),n,a,!0,s.signal);u=t.length>0?`${t.join(`
10
+ `)}
11
+ `:""}else for(let t of f){let e;if(t==="-")e=l();else{let h=s.fs.resolvePath(s.cwd,t);try{e=await s.fs.readFileBuffer(h)}catch{return{exitCode:1,stdout:u,stderr:`strings: ${t}: No such file or directory
12
+ `}}}let g=$(e,n,a,typeof e=="string",s.signal);g.length>0&&(u+=`${g.join(`
13
+ `)}
14
+ `)}return{exitCode:0,stdout:u,stderr:""}}},F={name:"strings",flags:[{flag:"-n",type:"value",valueHint:"number"},{flag:"-t",type:"value",valueHint:"string"},{flag:"-a",type:"boolean"},{flag:"-e",type:"value",valueHint:"string"}],stdinType:"text",needsFiles:!0};export{E as a,F as b};
@@ -0,0 +1,11 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{d as g}from"./chunk-U3UTFNHI.js";import{a as b,b as m,c as v}from"./chunk-QAYAQNCG.js";var L={name:"unexpand",summary:"convert spaces to tabs",usage:"unexpand [OPTION]... [FILE]...",description:"Convert blanks in each FILE to TABs, writing to standard output. If no FILE is specified, standard input is read.",options:["-t N Use N spaces per tab (default: 8)","-t LIST Use comma-separated list of tab stops","-a Convert all sequences of blanks (not just leading)"],examples:["unexpand file.txt # Convert leading spaces to tabs","unexpand -a file.txt # Convert all space sequences","unexpand -t 4 file.txt # Use 4-space tabs"]};function f(s){let i=s.split(",").map(o=>o.trim()),e=[];for(let o of i){let n=parseInt(o,10);if(Number.isNaN(n)||n<1)return null;e.push(n)}for(let o=1;o<e.length;o++)if(e[o]<=e[o-1])return null;return e}function C(s,i){if(i.length===1){let e=i[0];return s+(e-s%e)}for(let e of i)if(e>s)return e;if(i.length>=2){let e=i[i.length-1]-i[i.length-2],o=i[i.length-1],n=Math.floor((s-o)/e)+1;return o+n*e}return-1}function N(s,i){let{tabStops:e,allBlanks:o}=i,n="",a=0,t="",l=0,u=!0,d=()=>{if(t.length===0)return;let r=l+t.length;if(!o&&!u){n+=t,t="";return}let p=l,c="";for(;p<r;){let h=C(p,e);if(h<=r&&h>p)c+=" ",p=h;else break}let x=r-p;x>0&&(c+=" ".repeat(x)),n+=c,t=""};for(let r of s)r===" "?(t.length===0&&(l=a),t+=r,a++):r===" "?(d(),n+=r,a=C(a,e)):(d(),n+=r,a++,u=!1);return d(),n}function k(s,i){if(s==="")return"";let e=s.split(`
3
+ `),o=s.endsWith(`
4
+ `)&&e[e.length-1]==="";return o&&e.pop(),e.map(a=>N(a,i)).join(`
5
+ `)+(o?`
6
+ `:"")}var I={name:"unexpand",execute:async(s,i)=>{if(m(s))return b(L);let e={tabStops:[8],allBlanks:!1},o=[],n=0;for(;n<s.length;){let t=s[n];if(t==="-t"&&n+1<s.length){let l=f(s[n+1]);if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${s[n+1]}'
7
+ `};e.tabStops=l,n+=2}else if(t.startsWith("-t")&&t.length>2){let l=f(t.slice(2));if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${t.slice(2)}'
8
+ `};e.tabStops=l,n++}else if(t==="--tabs"&&n+1<s.length){let l=f(s[n+1]);if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${s[n+1]}'
9
+ `};e.tabStops=l,n+=2}else if(t.startsWith("--tabs=")){let l=f(t.slice(7));if(!l)return{exitCode:1,stdout:"",stderr:`unexpand: invalid tab size: '${t.slice(7)}'
10
+ `};e.tabStops=l,n++}else if(t==="-a"||t==="--all")e.allBlanks=!0,n++;else if(t==="--"){o.push(...s.slice(n+1));break}else{if(t.startsWith("-")&&t!=="-")return v("unexpand",t);o.push(t),n++}}let a="";if(o.length===0){let t=g(i.stdin)??"";a=k(t,e)}else for(let t of o){let l=i.fs.resolvePath(i.cwd,t),u=await i.fs.readFile(l);if(u===null)return{exitCode:1,stdout:a,stderr:`unexpand: ${t}: No such file or directory
11
+ `};a+=k(u,e)}return{exitCode:0,stdout:a,stderr:""}}},T={name:"unexpand",flags:[{flag:"-t",type:"value",valueHint:"number"},{flag:"-a",type:"boolean"}],stdinType:"text",needsFiles:!0};export{I as a,T as b};
@@ -0,0 +1,6 @@
1
+ import{createRequire} from"node:module";const require=createRequire(import.meta.url);
2
+ import{c as E}from"./chunk-R3HY2GCO.js";import{e as W}from"./chunk-Q6ZH76O4.js";import{l as h}from"./chunk-IQGNPH54.js";import{d as N}from"./chunk-U3UTFNHI.js";import{a as v,b as L,c as b}from"./chunk-QAYAQNCG.js";var k={name:"cut",summary:"remove sections from each line of files",usage:"cut [OPTION]... [FILE]...",options:["-c LIST select only these characters","-d DELIM use DELIM instead of TAB for field delimiter","-f LIST select only these fields","-s, --only-delimited do not print lines without delimiters"," --help display this help and exit"]};function M(r,o){let l=[],a=r.split(",");if(a.length>o)throw new h(`cut: range count limit exceeded (${o})`,"array_elements");for(let s of a)if(s.includes("-")){let[i,u]=s.split("-"),t=i?Number(i):1,f=u?Number(u):null;if(!Number.isSafeInteger(t)||t<1||f!==null&&(!Number.isSafeInteger(f)||f<t))throw new h("cut: invalid range","array_elements");l.push({start:t,end:f})}else{let i=Number(s);if(!Number.isSafeInteger(i)||i<1)throw new h("cut: invalid range","array_elements");l.push({start:i,end:i})}return l}function B(r,o){let l=[],a=new Set;for(let s of o){let i=s.start-1,u=s.end===null?r.length:s.end;for(let t=i;t<u&&t<r.length;t++)t>=0&&!a.has(t)&&(a.add(t),l.push(r[t]))}return l}var R={name:"cut",async execute(r,o){if(L(r))return v(k);let l=" ",a=null,s=null,i=!1,u=[];for(let n=0;n<r.length;n++){let e=r[n];if(e==="-d")l=r[++n]||" ";else if(e.startsWith("-d"))l=e.slice(2);else if(e==="-f")a=r[++n];else if(e.startsWith("-f"))a=e.slice(2);else if(e==="-c")s=r[++n];else if(e.startsWith("-c"))s=e.slice(2);else if(e==="-s"||e==="--only-delimited")i=!0;else{if(e.startsWith("--"))return b("cut",e);if(e.startsWith("-")){let d=!1;for(let c of e.slice(1))if(c==="s")i=!0;else if(!"dfc".includes(c)){d=!0;break}if(d)return b("cut",e)}else u.push(e)}}if(!a&&!s)return{stdout:"",stderr:`cut: you must specify a list of bytes, characters, or fields
3
+ `,exitCode:1};let t=await E(o,u,{cmdName:"cut"});if(!t.ok)return t.error;let m=(s?N(t.content):t.content).split(`
4
+ `);m.length>0&&m[m.length-1]===""&&m.pop();let x=M(a||s||"1",o.limits.maxArrayElements),g=new W(Math.min(o.limits.maxOutputSize,o.limits.maxStringLength),"cut"),S=0,I=n=>{if(!Number.isSafeInteger(n)||n<0||n>o.limits.maxLoopIterations-S)throw new h(`cut: range expansion limit exceeded (${o.limits.maxLoopIterations})`,"iterations");S+=n,o.executionScope?.consumeWork(n,"cut range expansion")};for(let n of m)if(s){let e=Array.from(n),d=[];for(let c of x){let y=c.start-1,w=c.end===null?e.length:c.end;I(Math.max(0,Math.min(w,e.length)-y));for(let p=y;p<w&&p<e.length;p++)p>=0&&d.push(e[p])}g.append(`${d.join("")}
5
+ `)}else{if(i&&!n.includes(l))continue;let e=n.split(l);for(let c of x){let y=c.start-1,w=c.end===null?e.length:c.end;I(Math.max(0,Math.min(w,e.length)-y))}let d=B(e,x);g.append(`${d.join(l)}
6
+ `)}return s?{stdout:g.build(),stderr:"",exitCode:0}:{stdout:g.build(),stderr:"",exitCode:0,stdoutKind:"bytes",stdoutEncoding:"binary"}}},$={name:"cut",flags:[{flag:"-d",type:"value",valueHint:"delimiter"},{flag:"-f",type:"value",valueHint:"string"},{flag:"-c",type:"value",valueHint:"string"},{flag:"-s",type:"boolean"}],stdinType:"text",needsFiles:!0};export{R as a,$ as b};