@inkeep/open-knowledge 0.3.0 → 0.4.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +658 -0
- package/dist/alias-JE7RI5QX-Bia4gLMF.mjs +1 -0
- package/dist/assets/skills/open-knowledge/SKILL.md +145 -52
- package/dist/awk2-POPGKRAI-DDrFV-7v.mjs +1 -0
- package/dist/{banner-BxI1wnW9.mjs → banner-DdbR6AZr.mjs} +2 -2
- package/dist/base64-4YMZCVJ5-DDKKOjMm.mjs +1 -0
- package/dist/basename-AA2KJYZQ-BK5zVs3W.mjs +1 -0
- package/dist/bash-IJWYRKFO-B9r1a0X9.mjs +1 -0
- package/dist/build-B6buVrsB.mjs +2 -0
- package/dist/cat-RDUMLXKC-CeNrSElK.mjs +1 -0
- package/dist/chmod-SYMGL4JA-DFJ4ylQU.mjs +1 -0
- package/dist/{chokidar-CblsKfnx.mjs → chokidar-CxU7f6JW.mjs} +1 -1
- package/dist/{chunk-24IMIIXA-Bz7rlZT3.mjs → chunk-24IMIIXA-B6yIPkk2.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-klp8GP84.mjs → chunk-3THT3N7L-DztAF386.mjs} +1 -1
- package/dist/{chunk-3ZUFRYJ4-C93H8j0V.mjs → chunk-3ZUFRYJ4-qsYuZX7b.mjs} +1 -1
- package/dist/{chunk-44UOCSGV-BUBpWxXm.mjs → chunk-44UOCSGV-CaFxJDHm.mjs} +1 -1
- package/dist/{chunk-4GTNDTRF-_OVmXcJ-.mjs → chunk-4GTNDTRF-PuLVuVJW.mjs} +2 -2
- package/dist/{chunk-4HHKTUW3-Dm69hDaZ.mjs → chunk-4HHKTUW3-CQ53AiA_.mjs} +1 -1
- package/dist/{chunk-4Q4SM6WR-DDQRsilN.mjs → chunk-4Q4SM6WR-BlQvqCag.mjs} +2 -2
- package/dist/{chunk-55VFSPNA-DVZfQAzN.mjs → chunk-55VFSPNA-DLwfww5b.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-DWTkM0vM.mjs → chunk-5QMZ5MUS-CAp625aG.mjs} +2 -2
- package/dist/{chunk-5QVNJEHU-BvsipSFW.mjs → chunk-5QVNJEHU-dbrKfPGl.mjs} +2 -2
- package/dist/{chunk-5V6VZH6T-BCr5_GDF.mjs → chunk-5V6VZH6T-DMPvCPbn.mjs} +2 -2
- package/dist/{chunk-62RKD26F-D-luOa0m.mjs → chunk-62RKD26F-B9la0pfD.mjs} +2 -2
- package/dist/{chunk-64BAICW3-CTJNEx4Q.mjs → chunk-64BAICW3-D92CLSK-.mjs} +2 -2
- package/dist/{chunk-74CEPOFO-D1bzz49u.mjs → chunk-74CEPOFO-BcZUJMO1.mjs} +1 -1
- package/dist/{chunk-7L36YK2X-RiPZFKaV.mjs → chunk-7L36YK2X-D7Z_Qw_C.mjs} +1 -1
- package/dist/{chunk-7TSDKFEO-a-GUGBTu.mjs → chunk-7TSDKFEO-DUQhJkDy.mjs} +1 -1
- package/dist/{chunk-A4HU7SVR-hefV_YmW.mjs → chunk-A4HU7SVR-DKLaJeys.mjs} +1 -1
- package/dist/{chunk-A4JSPFCI-U-xWmMMC.mjs → chunk-A4JSPFCI-CEm2r8SB.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-C7BVq0eF.mjs → chunk-A5O5YHGN-DvJz5Cpw.mjs} +2 -2
- package/dist/{chunk-A65PWWJC-D7J5l9eq.mjs → chunk-A65PWWJC-DV6RO_es.mjs} +2 -2
- package/dist/{chunk-A7A2DBEE-PLfkXLI4.mjs → chunk-A7A2DBEE-dTNL-45u.mjs} +1 -1
- package/dist/{chunk-A7ICOL4V-Drb3XsEL.mjs → chunk-A7ICOL4V-BvXPAaHu.mjs} +2 -2
- package/dist/{chunk-ALLTKNUZ-BMiTDN50.mjs → chunk-ALLTKNUZ-Cu6JFoC4.mjs} +2 -2
- package/dist/{chunk-APT7OOP2-CXHnSuct.mjs → chunk-APT7OOP2-DmUrFuRy.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-DURjrblE.mjs → chunk-BBXLRYSX-K758HlCs.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-CdrkqzRA.mjs → chunk-BRGMQKJV-BXc-9Cgj.mjs} +3 -3
- package/dist/{chunk-CR5AFCPT-ROmyDFrB.mjs → chunk-CR5AFCPT-DxNsgM0M.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-DFdwmFxJ.mjs → chunk-CWQS3NFK-Co4ALolT.mjs} +1 -1
- package/dist/{chunk-D4J545R4-C8nMOauR.mjs → chunk-D4J545R4-DkHLjHX6.mjs} +2 -2
- package/dist/{chunk-D6CWQ5DW-B-J4LN9N.mjs → chunk-D6CWQ5DW-7lvT8dGP.mjs} +2 -2
- package/dist/{chunk-D7MEQ3VN-Csvth_Ss.mjs → chunk-D7MEQ3VN-D8jJZr4A.mjs} +2 -2
- package/dist/{chunk-DCAAORBQ-BdrR5ttw.mjs → chunk-DCAAORBQ-C3s1D8OY.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-C774okS0.mjs → chunk-DXB73IDG-DIKSLkPq.mjs} +1 -1
- package/dist/{chunk-EEXR5ZDP-C5AJH114.mjs → chunk-EEXR5ZDP-CETL3_Uw.mjs} +1 -1
- package/dist/{chunk-EIZGF4BS-8bsVXqW0.mjs → chunk-EIZGF4BS-DOoQW9jQ.mjs} +2 -2
- package/dist/{chunk-F23WWYKW-DST0dB7V.mjs → chunk-F23WWYKW-BK2tpXPf.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-DqkrAMO5.mjs → chunk-F55TLFGB-Vy5RU2P3.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-C4x0A4rb.mjs → chunk-FEIOJCZD-C25Und0M.mjs} +2 -2
- package/dist/{chunk-GCTKCWKD-Deqi1D_N.mjs → chunk-GCTKCWKD-Di-RB9Qt.mjs} +1 -1
- package/dist/{chunk-GFQRA5P5-1fzItQ8F.mjs → chunk-GFQRA5P5-DnjwTqP3.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-PN17n-Z0.mjs → chunk-GOV5EKKI-CKV9jOGv.mjs} +2 -2
- package/dist/{chunk-GXVXFKBA-993FoPmq.mjs → chunk-GXVXFKBA-CUKDClxt.mjs} +2 -2
- package/dist/{chunk-HDQ56CKY-pGV4pOJA.mjs → chunk-HDQ56CKY-MTQ75a8z.mjs} +2 -2
- package/dist/{chunk-HJQJAYMS-Ci3vsKQW.mjs → chunk-HJQJAYMS-D-8Vc6Zb.mjs} +1 -1
- package/dist/{chunk-HJWBQKYG-UZig4wUt.mjs → chunk-HJWBQKYG-XrOcsn2f.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-Dikp87Ww.mjs → chunk-HWBSOZZR-BZF8XsyZ.mjs} +2 -2
- package/dist/{chunk-HWKDQ44K-CPSjqtR_.mjs → chunk-HWKDQ44K-wgmyck2O.mjs} +2 -2
- package/dist/{chunk-I57KEIP3-B1DoH8rp.mjs → chunk-I57KEIP3-DipCOPKf.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-BbWncVr2.mjs → chunk-IPJHKYVM-C3IodQq7.mjs} +1 -1
- package/dist/{chunk-J642UCRS-DB77Y2Wt.mjs → chunk-J642UCRS-YiNealfn.mjs} +2 -2
- package/dist/{chunk-JVPRLUMK-DnQCNjpq.mjs → chunk-JVPRLUMK-VMFWXimu.mjs} +2 -2
- package/dist/{chunk-KMEYNNUA-DfdK88O_.mjs → chunk-KMEYNNUA-pRogdye4.mjs} +2 -2
- package/dist/{chunk-LL3S3NLB-DxXgE3kY.mjs → chunk-LL3S3NLB-ByBS5IDP.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-BXfU9TgM.mjs → chunk-LPQPILI2-FRQB9gt5.mjs} +2 -2
- package/dist/{chunk-LTZRCH7N-GAjTFNwG.mjs → chunk-LTZRCH7N-46S7WKw8.mjs} +2 -2
- package/dist/{chunk-LWEGUNWT-BALY4RLC.mjs → chunk-LWEGUNWT-DdGmM3wr.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-D6GWoJsI.mjs → chunk-MDDMCKUK-CuRdI1Uv.mjs} +2 -2
- package/dist/{chunk-MDLLFABN-oBQf6bGE.mjs → chunk-MDLLFABN-Wd1iVjXi.mjs} +2 -2
- package/dist/{chunk-MHTUABJP-dKmK6Hw7.mjs → chunk-MHTUABJP-BWrqic3t.mjs} +1 -1
- package/dist/{chunk-MIZPJHVH-z-geAni9.mjs → chunk-MIZPJHVH-DWdPvcYR.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-DB-C8Hx8.mjs → chunk-MLXIYONF-CiCzoeGt.mjs} +2 -2
- package/dist/{chunk-MYE6AGBJ-B4pRo9ma.mjs → chunk-MYE6AGBJ-DJo74dVC.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-CX0lf-xx.mjs → chunk-NAERJDUW-CIHrNgJB.mjs} +2 -2
- package/dist/{chunk-NCNPKYJZ-BFGan4lR.mjs → chunk-NCNPKYJZ-BVljycUZ.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-D2NXm2ND.mjs → chunk-NUYSJFDK-BTseBdxv.mjs} +2 -2
- package/dist/{chunk-NYQYO467-Degkom4D.mjs → chunk-NYQYO467-BgXuDHUQ.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-CY8D2Qov.mjs → chunk-OARHFVLG-Cr0x3Si_.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-BMsyLQhm.mjs → chunk-OCLXQMOG-BW6rwyzS.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-BHslttnj.mjs → chunk-OCS6LSEM-D7VAOziZ.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-BV5MVRVg.mjs → chunk-OJDRYQWQ-ikvLWpfV.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-Bmgu4tW4.mjs → chunk-OL3S66CO-CQnF8cPH.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-lGjqkk78.mjs → chunk-PBXLG62G-CgbPJTiw.mjs} +2 -2
- package/dist/{chunk-PP6PSHAB-DMC_XCfO.mjs → chunk-PP6PSHAB-CO4MYU__.mjs} +1 -1
- package/dist/{chunk-PYSFUGCK-CY7pclEB.mjs → chunk-PYSFUGCK-DsRn64Ef.mjs} +2 -2
- package/dist/{chunk-QCDB2VPH-D1RuXtOm.mjs → chunk-QCDB2VPH-BUMOhlW7.mjs} +2 -2
- package/dist/{chunk-QJ7O6ZN3-BH67tCjg.mjs → chunk-QJ7O6ZN3-F0_rcDPM.mjs} +2 -2
- package/dist/{chunk-R6QSAL5T-CtbJTvt9.mjs → chunk-R6QSAL5T-CeW6f7-x.mjs} +1 -1
- package/dist/{chunk-R6VWJ2ZL-B0CcMPyK.mjs → chunk-R6VWJ2ZL-FwG_Za20.mjs} +1 -1
- package/dist/{chunk-RPNGRAAP-BughPjdR.mjs → chunk-RPNGRAAP-BmkapBPD.mjs} +2 -2
- package/dist/{chunk-SDNKECQQ-C3GEf3VZ.mjs → chunk-SDNKECQQ-DkebEzkd.mjs} +2 -2
- package/dist/{chunk-SYMJJMQ4-CWTh95-4.mjs → chunk-SYMJJMQ4-DOZMaECk.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-DlKQeuXU.mjs → chunk-T56QNPHK-DPXaSSfC.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-B8UnqY4U.mjs → chunk-TLSUDHID-BovZg0r1.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-BcdbBQ2p.mjs → chunk-TOMNU26N-AAglMy4J.mjs} +2 -2
- package/dist/{chunk-TXBZCHCQ-l48TczF5.mjs → chunk-TXBZCHCQ-WeVWfqYv.mjs} +2 -2
- package/dist/{chunk-UNYNJIFU-DwPQMz0F.mjs → chunk-UNYNJIFU-CqGlXAg7.mjs} +3 -3
- package/dist/{chunk-V7TAPXDL-CnKUp2df.mjs → chunk-V7TAPXDL-DQgGPvBY.mjs} +2 -2
- package/dist/{chunk-VJFXDYWH-IiUXkKX0.mjs → chunk-VJFXDYWH-DIo0Ia0_.mjs} +2 -2
- package/dist/{chunk-VLGZJRPG-D4NVKJYL.mjs → chunk-VLGZJRPG-DymOu90-.mjs} +2 -2
- package/dist/{chunk-VOBGTVA6-BT7gUxqf.mjs → chunk-VOBGTVA6-Bfa1NTzt.mjs} +2 -2
- package/dist/{chunk-VYOJP4TV-BvibOnKG.mjs → chunk-VYOJP4TV-PBsHe2md.mjs} +2 -2
- package/dist/{chunk-WKFATFPP-DCZdrA8x.mjs → chunk-WKFATFPP-KO2zkfs2.mjs} +2 -2
- package/dist/{chunk-X2AJGDEF-BaH6i1Rq.mjs → chunk-X2AJGDEF-D5w6wtaX.mjs} +1 -1
- package/dist/{chunk-XHM67O4N-Cg35xc6b.mjs → chunk-XHM67O4N-akBjDPaR.mjs} +1 -1
- package/dist/{chunk-XKQRETAK-cVWA9gEB.mjs → chunk-XKQRETAK-RHzVmuiF.mjs} +2 -2
- package/dist/{chunk-XORM457F-CRToN1RQ.mjs → chunk-XORM457F-wr_DBBnV.mjs} +2 -2
- package/dist/{chunk-XVDPCNWR-CtK-Xs2O.mjs → chunk-XVDPCNWR-DxaG1FfA.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-Ox9Z0Nk6.mjs → chunk-YCFVLTST-Dzwevuc3.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-Csgr05KV.mjs → chunk-YFG2CMIF-BoZQym0L.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-BpP11HXS.mjs → chunk-YNYSPYQ5-DesxOVHh.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-BEZxz_aQ.mjs → chunk-YS3AZT3J-CBc9LHIy.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-DuBR2-TM.mjs → chunk-YTNYSM6T-WMIf3AF8.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-DbRghyzT.mjs → chunk-Z6LRHWXI-DGTVoTuf.mjs} +2 -2
- package/dist/{chunk-Z7JVV2SM-BzR-yvwK.mjs → chunk-Z7JVV2SM-Cb4YKOCM.mjs} +2 -2
- package/dist/clear-5CZ5X4YR-CadVxKrq.mjs +1 -0
- package/dist/cli.mjs +58 -1400
- package/dist/colors-BNufdynn.mjs +2 -0
- package/dist/colors-T3xmlXQT.mjs +1 -0
- package/dist/column-WLPMMSTS-6o4DDsDk.mjs +1 -0
- package/dist/comm-5SLSESQG-C2GatHU6.mjs +1 -0
- package/dist/config-schema.json +87 -0
- package/dist/config.project-local.schema.json +30 -0
- package/dist/config.project.schema.json +59 -0
- package/dist/config.user.schema.json +58 -0
- package/dist/constants-Dc6GZ6j9.mjs +2 -0
- package/dist/cp-XOYR4ABJ-DmS6dER-.mjs +1 -0
- package/dist/{curl-47BFPSFW-Kn_Na_aU.mjs → curl-47BFPSFW-C2kRcGkX.mjs} +2 -2
- package/dist/cut-OPC3VAGB-s4tQWhL5.mjs +1 -0
- package/dist/date-DD7FVA2V-Dubgjr6a.mjs +1 -0
- package/dist/diff-HJF2MPDN-DjGBLQph.mjs +1 -0
- package/dist/dirname-LEMTZZFS-B477CImE.mjs +1 -0
- package/dist/dist-B6pNPboH.mjs +1609 -0
- package/dist/dist-DVM7wH81.mjs +359 -0
- package/dist/dist-DXLSMgBY.mjs +1 -0
- package/dist/du-WO2ENHXQ-C4c5wweW.mjs +1 -0
- package/dist/echo-O45JWWI2-TudodhHR.mjs +1 -0
- package/dist/env-5EPCWSXR-CTcNEMpy.mjs +1 -0
- package/dist/{esm-BFkWzFey.mjs → esm-BbkJd7ro.mjs} +1 -1
- package/dist/{esm-wByiX8MO.mjs → esm-CEs3LWY3.mjs} +2 -2
- package/dist/{execAsync-0jii24p9.mjs → execAsync-CulVJBMN.mjs} +1 -1
- package/dist/{execAsync-Czqc-yAz.mjs → execAsync-CzW9fUYQ.mjs} +1 -1
- package/dist/{execAsync-DgmLXmTx.mjs → execAsync-DuQoqWaW.mjs} +1 -1
- package/dist/expand-DTNXU4LQ-BT6M2Tdc.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-Cy7j--Iy.mjs +1 -0
- package/dist/expr-5T3UU5KE-D2Kr5nuJ.mjs +1 -0
- package/dist/file-ZIGAJ4YS-BH3jYcuM.mjs +1 -0
- package/dist/find-TPUOAIUQ-RFxkUcGN.mjs +1 -0
- package/dist/flag-coverage-QT4N2Z44--nNG-HLV.mjs +2 -0
- package/dist/fold-LDSORVYE-CfKQmrJ1.mjs +1 -0
- package/dist/{getMachineId-bsd-C1M346yz.mjs → getMachineId-bsd-DAmB-Ym0.mjs} +2 -2
- package/dist/{getMachineId-bsd-CPESl3L6.mjs → getMachineId-bsd-FYDP9w5Q.mjs} +2 -2
- package/dist/{getMachineId-bsd-DEUypOXJ.mjs → getMachineId-bsd-mPrX3ckm.mjs} +2 -2
- package/dist/{getMachineId-darwin-0hBTy7c8.mjs → getMachineId-darwin-B0Qw-MTj.mjs} +2 -2
- package/dist/{getMachineId-darwin-CJK3eX9q.mjs → getMachineId-darwin-C79HtyON.mjs} +2 -2
- package/dist/{getMachineId-darwin-Vupnt-kR.mjs → getMachineId-darwin-Co8Jnu5v.mjs} +2 -2
- package/dist/{getMachineId-linux-BGQn48cN.mjs → getMachineId-linux-BBORs2cS.mjs} +2 -2
- package/dist/{getMachineId-linux-CIp07XEX.mjs → getMachineId-linux-BizmCjYq.mjs} +2 -2
- package/dist/{getMachineId-linux-B2nkqMir.mjs → getMachineId-linux-BvLCCmKQ.mjs} +2 -2
- package/dist/{getMachineId-unsupported-CH1Q20xN.mjs → getMachineId-unsupported-Bgp-Es9j.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DfSmC7Gy.mjs → getMachineId-unsupported-CbR45h2D.mjs} +2 -2
- package/dist/{getMachineId-unsupported-BnsanXR2.mjs → getMachineId-unsupported-DbGFOAw1.mjs} +2 -2
- package/dist/{getMachineId-win-BmmB_8yL.mjs → getMachineId-win-CT_Y5i_4.mjs} +2 -2
- package/dist/{getMachineId-win-DlPRChXs.mjs → getMachineId-win-Cy0XHq4X.mjs} +2 -2
- package/dist/{getMachineId-win-JnMJbIaW.mjs → getMachineId-win-D5gDnBHa.mjs} +2 -2
- package/dist/{git-handle-BhGnmvTB-BMB_49Sb.mjs → git-handle-DwfYp_z--CfyPz4Dz.mjs} +2 -2
- package/dist/git-handle-DwfYp_z--DreW3fNC.mjs +1 -0
- package/dist/grep-3AIAIJVR-DgQJLmW0.mjs +1 -0
- package/dist/gzip-AQXSGOVS-yXjpnIVd.mjs +1 -0
- package/dist/head-HT2B6D2J-BR4RHRTk.mjs +1 -0
- package/dist/help-VVWX7SA5-M6C6klSC.mjs +1 -0
- package/dist/history-J4QRNGRO-C1r7-kvT.mjs +1 -0
- package/dist/hostname-BK6HG2DE-BBBcRrtV.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-B9oYuMVf.mjs +1 -0
- package/dist/index.d.mts +9 -2278
- package/dist/index.mjs +1 -1
- package/dist/init-B7qJnXKB.mjs +397 -0
- package/dist/init-DiH9oQ6_.mjs +1 -0
- package/dist/{is-object-BNVklKxg.mjs → is-object-DF0ZeuvD.mjs} +1 -1
- package/dist/join-GG2LDHE5-xeTE0Mi4.mjs +1 -0
- package/dist/jq-ODXZBPLY-C5v6qNu_.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-DSk5_wnx.mjs → js-exec-M6UR76J5-IyD-lpzv.mjs} +3 -3
- package/dist/{lib-Dl2j2VNl.mjs → lib-BOCdCkg7.mjs} +1 -1
- package/dist/{libesm-DC4M2SkF.mjs → libesm-YL3Bqolr.mjs} +1 -1
- package/dist/ln-4TRFBYAT-4XMTO1OQ.mjs +1 -0
- package/dist/loader-BQf8AJXb.mjs +4 -0
- package/dist/loader-C8lkPKn8.mjs +1 -0
- package/dist/ls-KSXFZCWH-Bw_Cf-VY.mjs +1 -0
- package/dist/{lzma-0LJzVZpl.mjs → lzma-vr8hBkhz.mjs} +2 -2
- package/dist/md5sum-INMIK4DX-CAIH4ZVI.mjs +1 -0
- package/dist/mkdir-TDEMSB6C-D1oUG8Jf.mjs +1 -0
- package/dist/mrmime-C2W7cgq2.mjs +2 -0
- package/dist/mv-Z6MORUFL-CN471qcL.mjs +1 -0
- package/dist/nl-U5YJDM32-CFzXKze3.mjs +1 -0
- package/dist/od-VJEF2UR5-C2R4Accu.mjs +1 -0
- package/dist/{open-browser-BzMQ6cLf.mjs → open-browser-BZZK_gJj.mjs} +1 -1
- package/dist/paste-7N6AFSDS-bUl2Dwz3.mjs +1 -0
- package/dist/preview-CN1rHXBb.mjs +1 -0
- package/dist/preview-DUTos2Es.mjs +3 -0
- package/dist/printf-CX64KX2P-Ce--gWAq.mjs +1 -0
- package/dist/public/assets/ActivityModeContent-1ymqlcHI.js +2 -0
- package/dist/public/assets/{ActivityPanelDiffView-D-EUyEh6.js → ActivityPanelDiffView-DoHWP1ak.js} +1 -1
- package/dist/public/assets/DocumentContext-bvfr7pL2.js +37 -0
- package/dist/public/assets/GraphPanel-DdVygxYk.js +46 -0
- package/dist/public/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/public/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/public/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/public/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/public/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/public/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/public/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/public/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/public/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/public/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/public/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/public/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/public/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/public/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/public/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/public/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/public/assets/McpConsentDialogBody-CJwPf_uv.js +1 -0
- package/dist/public/assets/OutlinePanel-dumodx-h.js +2 -0
- package/dist/public/assets/SettingsPane-CtgbQZxP.js +6 -0
- package/dist/public/assets/SourceEditor-CR_7DOAH.js +2 -0
- package/dist/public/assets/__vite-browser-external-FEGw1XPd.js +1 -0
- package/dist/public/assets/_baseFor-CX8dsZbW.js +1 -0
- package/dist/public/assets/{agent-presence-BXsx4eTl.js → agent-presence-Ds2n3U5P.js} +1 -1
- package/dist/public/assets/arc-BL_OKZmE.js +1 -0
- package/dist/public/assets/architecture-YZFGNWBL-DVxNz-zn.js +1 -0
- package/dist/public/assets/architectureDiagram-Q4EWVU46-BKKtWWhU.js +36 -0
- package/dist/public/assets/array-X0JlPOfd.js +1 -0
- package/dist/public/assets/blockDiagram-DXYQGD6D-fzO4vZye.js +132 -0
- package/dist/public/assets/{button-BPXuMr5W.js → button-BsFpqlpT.js} +1 -1
- package/dist/public/assets/c4Diagram-AHTNJAMY-BkXqEjiP.js +10 -0
- package/dist/public/assets/channel-CR-xJel6.js +1 -0
- package/dist/public/assets/chunk-2KRD3SAO-DQj0pw3H.js +1 -0
- package/dist/public/assets/chunk-336JU56O-CBajDulv.js +2 -0
- package/dist/public/assets/chunk-426QAEUC-BoBKbVmN.js +1 -0
- package/dist/public/assets/chunk-4BX2VUAB-D8pbSOlJ.js +1 -0
- package/dist/public/assets/chunk-4TB4RGXK-mA6CujZO.js +206 -0
- package/dist/public/assets/chunk-55IACEB6-CqVyNzhX.js +1 -0
- package/dist/public/assets/chunk-5FUZZQ4R-BVDLgFg2.js +62 -0
- package/dist/public/assets/chunk-5PVQY5BW-Cxi5d3lT.js +2 -0
- package/dist/public/assets/chunk-67CJDMHE-CdrAY8qZ.js +1 -0
- package/dist/public/assets/chunk-7N4EOEYR-CJ3HBg3c.js +1 -0
- package/dist/public/assets/chunk-AA7GKIK3-D0ckJAXt.js +1 -0
- package/dist/public/assets/chunk-BSJP7CBP-D4bNhKd7.js +1 -0
- package/dist/public/assets/chunk-CFjPhJqf.js +1 -0
- package/dist/public/assets/chunk-CIAEETIT-D1Fpp2md.js +1 -0
- package/dist/public/assets/chunk-EDXVE4YY-ChhT3Iyo.js +1 -0
- package/dist/public/assets/chunk-ENJZ2VHE-Bby39so4.js +10 -0
- package/dist/public/assets/chunk-FMBD7UC4-pRkDIOZn.js +15 -0
- package/dist/public/assets/chunk-FOC6F5B3-BsB4oTj4.js +1 -0
- package/dist/public/assets/chunk-ICPOFSXX-CrnuSfeJ.js +122 -0
- package/dist/public/assets/chunk-K5T4RW27-CtREah_n.js +94 -0
- package/dist/public/assets/chunk-KGLVRYIC-DtDxSfKu.js +1 -0
- package/dist/public/assets/chunk-LIHQZDEY-D63TRk6j.js +1 -0
- package/dist/public/assets/chunk-ORNJ4GCN-Dv2PvYVu.js +1 -0
- package/dist/public/assets/chunk-OYMX7WX6-BhfqKepC.js +231 -0
- package/dist/public/assets/chunk-QZHKN3VN-DBRWHtgj.js +1 -0
- package/dist/public/assets/chunk-U2HBQHQK-6BAKH95D.js +70 -0
- package/dist/public/assets/chunk-X2U36JSP-Cqpkx90-.js +1 -0
- package/dist/public/assets/chunk-XPW4576I-DSytTnq4.js +32 -0
- package/dist/public/assets/chunk-YZCP3GAM-Dt9awjVh.js +1 -0
- package/dist/public/assets/chunk-ZZ45TVLE-JGFITgiO.js +1 -0
- package/dist/public/assets/classDiagram-6PBFFD2Q-oopM_Z0m.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-ZAL74u9S.js +1 -0
- package/dist/public/assets/clone-C5y6xhRJ.js +1 -0
- package/dist/public/assets/colors-XIJoz9Bd.js +1 -0
- package/dist/public/assets/{compiler-runtime-Y11fyRVL.js → compiler-runtime-CVnuRdak.js} +1 -1
- package/dist/public/assets/config-validation-events-BvuBj41U.js +1 -0
- package/dist/public/assets/cose-bilkent-S5V4N54A-B9nG-SHi.js +1 -0
- package/dist/public/assets/cytoscape.esm-BkjNfcSF.js +321 -0
- package/dist/public/assets/dagre-BEdPLXba.js +1 -0
- package/dist/public/assets/dagre-KV5264BT-DKn5nGCC.js +4 -0
- package/dist/public/assets/defaultLocale-ZxyFnXCb.js +1 -0
- package/dist/public/assets/diagram-5BDNPKRD-BQuwYEd0.js +10 -0
- package/dist/public/assets/diagram-G4DWMVQ6-BmzIMyV5.js +24 -0
- package/dist/public/assets/diagram-MMDJMWI5-CI5eJfgr.js +43 -0
- package/dist/public/assets/diagram-TYMM5635-Cc8TJ7v3.js +24 -0
- package/dist/public/assets/dialog-Cv1qneWl.js +45 -0
- package/dist/public/assets/{dist-DR1MrLJC.js → dist-B4kUko7n.js} +1 -1
- package/dist/public/assets/{dist-BqO6NfD-.js → dist-BH1b1nWB.js} +1 -1
- package/dist/public/assets/{dist-DlS42TIP.js → dist-BOapDt7N.js} +1 -1
- package/dist/public/assets/dist-CIRuNcH5.js +1 -0
- package/dist/public/assets/{dist-GlH2KPqY.js → dist-D08h1pJc.js} +1 -1
- package/dist/public/assets/{dist-D2wwoXzm.js → dist-S8LJmtzL.js} +1 -1
- package/dist/public/assets/{dist-DeDgmJv2.js → dist-VyzSEzD4.js} +1 -1
- package/dist/public/assets/{dist-CgLbXgrr.js → dist-nPpvoMNC.js} +1 -1
- package/dist/public/assets/doc-hash-Q6dTjwu5.js +421 -0
- package/dist/public/assets/erDiagram-SMLLAGMA-BkrhGWMT.js +85 -0
- package/dist/public/assets/flatten-UmyAv3V9.js +1 -0
- package/dist/public/assets/flowDiagram-DWJPFMVM-qh62fanI.js +162 -0
- package/dist/public/assets/ganttDiagram-T4ZO3ILL-DXuCeCk6.js +292 -0
- package/dist/public/assets/gitGraph-7Q5UKJZL-CYhZlmk3.js +1 -0
- package/dist/public/assets/gitGraphDiagram-UUTBAWPF-BbcuenPj.js +106 -0
- package/dist/public/assets/graphlib-CasrTmMJ.js +1 -0
- package/dist/public/assets/image-preview-BJSGEOo4.png +0 -0
- package/dist/public/assets/index-B1y9QLHF.js +1858 -0
- package/dist/public/assets/index-DoXig4bf.css +1 -0
- package/dist/public/assets/info-OMHHGYJF-BslcKZhH.js +1 -0
- package/dist/public/assets/infoDiagram-42DDH7IO-WFAMbO2S.js +2 -0
- package/dist/public/assets/init-CBj3ecIW.js +1 -0
- package/dist/public/assets/isEmpty-DWJlzxR1.js +1 -0
- package/dist/public/assets/isObjectLike-AdQZ65l0.js +1 -0
- package/dist/public/assets/isSymbol-BP7IOIqG.js +1 -0
- package/dist/public/assets/ishikawaDiagram-UXIWVN3A-BJBiReWg.js +70 -0
- package/dist/public/assets/journeyDiagram-VCZTEJTY-Boq77pl6.js +139 -0
- package/dist/public/assets/kanban-definition-6JOO6SKY-DYMSr18F.js +89 -0
- package/dist/public/assets/katex-qwlL5fSd.js +257 -0
- package/dist/public/assets/line-_p5Px7MV.js +1 -0
- package/dist/public/assets/linear-DwuDS4qT.js +1 -0
- package/dist/public/assets/mcp-consent-store-BBTXqzE6.js +1 -0
- package/dist/public/assets/mermaid-parser.core-BcBb_Ows.js +4 -0
- package/dist/public/assets/mermaid.core-ZLTnLqVQ.js +11 -0
- package/dist/public/assets/min-HKuGSUqa.js +1 -0
- package/dist/public/assets/mindmap-definition-QFDTVHPH-BSxM4djR.js +96 -0
- package/dist/public/assets/now-BBH4UqDm.js +1 -0
- package/dist/public/assets/ordinal-CeOFUmRv.js +1 -0
- package/dist/public/assets/packet-4T2RLAQJ-QVnYA304.js +1 -0
- package/dist/public/assets/{panel-BCRdtBla.js → panel-BgMqDESF.js} +1 -1
- package/dist/public/assets/path-rUlDLHdA.js +1 -0
- package/dist/public/assets/pdf-a35ddrIO.js +54 -0
- package/dist/public/assets/pdf.worker-B1D2UnXD.mjs +63133 -0
- package/dist/public/assets/pdf.worker-CM-zAFN-.js +1 -0
- package/dist/public/assets/pie-ZZUOXDRM-C61c5byc.js +1 -0
- package/dist/public/assets/pieDiagram-DEJITSTG-CHRE_Jie.js +30 -0
- package/dist/public/assets/preload-helper-2ej06EnG.js +1 -0
- package/dist/public/assets/propagation-api-qAYD7s-v.js +1 -0
- package/dist/public/assets/quadrantDiagram-34T5L4WZ-CQkE5TwH.js +7 -0
- package/dist/public/assets/radar-PYXPWWZC-CMxjRtd8.js +1 -0
- package/dist/public/assets/reduce-DotyoGA7.js +1 -0
- package/dist/public/assets/requirementDiagram-MS252O5E-DHK98tKS.js +84 -0
- package/dist/public/assets/rough.esm-BFJ-MgcB.js +1 -0
- package/dist/public/assets/sankeyDiagram-XADWPNL6-BIXaStZh.js +10 -0
- package/dist/public/assets/sequenceDiagram-FGHM5R23-BCNH3kJo.js +157 -0
- package/dist/public/assets/src-C9jsS3p4.js +1 -0
- package/dist/public/assets/src-zyMpT2LE.js +1 -0
- package/dist/public/assets/stateDiagram-FHFEXIEX-BC5mjB6x.js +1 -0
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-B8L3BBt1.js +1 -0
- package/dist/public/assets/stex-BKMR5xQj.js +1 -0
- package/dist/public/assets/target-navigation-intent-BfGOumP6.js +1 -0
- package/dist/public/assets/telemetry-impl-CMeDUVKn.js +2 -0
- package/dist/public/assets/timeline-definition-GMOUNBTQ-VNxUGgXp.js +120 -0
- package/dist/public/assets/tooltip-CBGDOTMI.js +1 -0
- package/dist/public/assets/trace-api-DPMyR1_m.js +1 -0
- package/dist/public/assets/treeView-SZITEDCU-DfSa_Oiv.js +1 -0
- package/dist/public/assets/treemap-W4RFUUIX-Cp0s5wEq.js +1 -0
- package/dist/public/assets/vennDiagram-DHZGUBPP-DV2Y2j0r.js +34 -0
- package/dist/public/assets/video-preview-vLovc_Vy.png +0 -0
- package/dist/public/assets/wardley-RL74JXVD-CXcBKCuj.js +1 -0
- package/dist/public/assets/wardleyDiagram-NUSXRM2D-C1mMZ3kx.js +20 -0
- package/dist/public/assets/xychartDiagram-5P7HB3ND-CxFcwN2X.js +7 -0
- package/dist/public/index.html +43 -18
- package/dist/pwd-D4OZ7N27-C18XewhV.mjs +1 -0
- package/dist/{python3-AUFTPCU6-MeZyx8_A.mjs → python3-AUFTPCU6-BaJugIdp.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-CHvs7DDT.mjs +1 -0
- package/dist/rev-XOSYPP45-2mnFFZWW.mjs +1 -0
- package/dist/rg-FOQSCCX3-BJahNfSe.mjs +1 -0
- package/dist/rm-RTZG23RL-D9-0WGRY.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-Br7eH9kL.mjs +1 -0
- package/dist/{rolldown-runtime-wcPFST8Q-BB0WpHs3.mjs → rolldown-runtime-twds-ZHy-Dxr-RWJs.mjs} +1 -1
- package/dist/schemas/v0/config.project-local.schema.json +30 -0
- package/dist/schemas/v0/config.project.schema.json +59 -0
- package/dist/schemas/v0/config.user.schema.json +58 -0
- package/dist/sed-VFTTATXJ-mYhAmixc.mjs +1 -0
- package/dist/seq-RN5ZUASB-CKf5MNNO.mjs +1 -0
- package/dist/server-lock-D7DXNVql-B5nINglj.mjs +1 -0
- package/dist/server-lock-D7DXNVql-BRVVzA6T.mjs +2 -0
- package/dist/sha1sum-VJPNLNU6-DuOHap1X.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-D9fEipQ7.mjs +1 -0
- package/dist/sleep-VZFPZFWA-B1fSoYuO.mjs +1 -0
- package/dist/sort-DCNRDA7U-DDCY4JZu.mjs +1 -0
- package/dist/split-SITCSYCZ-b9hfEJw7.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-BQEx5i3P.mjs +1 -0
- package/dist/src-Cak39c0B.mjs +1 -0
- package/dist/start-BXk7J0Kh.mjs +1 -0
- package/dist/start-D6Ip3u6P.mjs +3 -0
- package/dist/stat-BT5A227F-Dzp4sgau.mjs +1 -0
- package/dist/strings-7PLOGTPD-DT41jX9d.mjs +1 -0
- package/dist/tac-SJGXQ4T2-BpdVoP8b.mjs +1 -0
- package/dist/tail-S5ULNTJU-0-sYrYik.mjs +1 -0
- package/dist/tar-ANUBEFJY-Wh3na_NU.mjs +1 -0
- package/dist/tee-O7VXZDCO-CwnGG0go.mjs +1 -0
- package/dist/time-DEUO3QV2-DzkqaQ1k.mjs +1 -0
- package/dist/timeout-VRKMCG72-BtPBpIRq.mjs +1 -0
- package/dist/touch-DX2IJOQ4-KW0Ui-lB.mjs +1 -0
- package/dist/tr-2HXZRDSW-C6Kf0M8T.mjs +1 -0
- package/dist/tree-LYXBS7DC-BN1FBqvM.mjs +1 -0
- package/dist/true-WHJNXCHG-DxCMVdqj.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-DZ4Kf6Xq.mjs +1 -0
- package/dist/uniq-SUNANL47-Ceg51JdA.mjs +1 -0
- package/dist/wc-TQB3VNOX-BzWNq0MY.mjs +1 -0
- package/dist/which-XZHEH76L-DH_U2-Cj.mjs +1 -0
- package/dist/whoami-DGKU3D2X-BholYNPM.mjs +1 -0
- package/dist/xan-BXDXYEIB-b1eAtgch.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-DWDC57b_.mjs +1 -0
- package/dist/xargs-I6EZUCYF-Cov-i7kW.mjs +1 -0
- package/dist/yq-MJMAR36V-1r29nH4p.mjs +1 -0
- package/package.json +12 -15
- package/scripts/build-config-schema.mjs +69 -0
- package/scripts/postinstall.mjs +0 -20
- package/scripts/probe-exec.ts +7 -10
- package/scripts/probe-read-document.ts +1 -13
- package/dist/alias-JE7RI5QX-TirEebNy.mjs +0 -1
- package/dist/awk2-POPGKRAI-DigGXYmO.mjs +0 -1
- package/dist/base64-4YMZCVJ5-B4GnvJtR.mjs +0 -1
- package/dist/basename-AA2KJYZQ-DlZHEU5f.mjs +0 -1
- package/dist/bash-IJWYRKFO-BA1gxmDh.mjs +0 -1
- package/dist/build-D4l8tfO0.mjs +0 -2
- package/dist/cat-RDUMLXKC-CAQOzqfy.mjs +0 -1
- package/dist/chmod-SYMGL4JA-BC2VVHCa.mjs +0 -1
- package/dist/clear-5CZ5X4YR-B5oRhK00.mjs +0 -1
- package/dist/colors-BnZ-i-vb.mjs +0 -1
- package/dist/colors-DoPZvo1q.mjs +0 -2
- package/dist/column-WLPMMSTS-fFssyAvW.mjs +0 -1
- package/dist/comm-5SLSESQG-DRcwK9Gt.mjs +0 -1
- package/dist/constants-ekUaxW9F.mjs +0 -2
- package/dist/cp-XOYR4ABJ-BUZu7KNi.mjs +0 -1
- package/dist/cut-OPC3VAGB-BIRZEN2Y.mjs +0 -1
- package/dist/date-DD7FVA2V-DRxppxbV.mjs +0 -1
- package/dist/diff-HJF2MPDN-Yo3lE_58.mjs +0 -1
- package/dist/dirname-LEMTZZFS-2cTXnmQf.mjs +0 -1
- package/dist/dist-0qFIeeXA.mjs +0 -142
- package/dist/dist-BCyi1oM7.mjs +0 -116
- package/dist/dist-CXdg7KnM.mjs +0 -199
- package/dist/dist-Ct-gJ7iD.mjs +0 -1
- package/dist/du-WO2ENHXQ-B5uda2-L.mjs +0 -1
- package/dist/echo-O45JWWI2-B9QCpaZR.mjs +0 -1
- package/dist/env-5EPCWSXR--4eujSrM.mjs +0 -1
- package/dist/expand-DTNXU4LQ-BWwDphsm.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-BBTiIHJS.mjs +0 -1
- package/dist/expr-5T3UU5KE-D5OdgUlD.mjs +0 -1
- package/dist/file-ZIGAJ4YS-zZfB3nws.mjs +0 -1
- package/dist/find-TPUOAIUQ-DaW1-9Vm.mjs +0 -1
- package/dist/flag-coverage-QT4N2Z44-B8zntJyb.mjs +0 -2
- package/dist/fold-LDSORVYE-CAfX9d8n.mjs +0 -1
- package/dist/git-handle-BhGnmvTB-Di8EsrYa.mjs +0 -1
- package/dist/grep-3AIAIJVR-C9A_aSMK.mjs +0 -1
- package/dist/gzip-AQXSGOVS-CL228lzk.mjs +0 -1
- package/dist/head-HT2B6D2J-DyNkF3aY.mjs +0 -1
- package/dist/help-VVWX7SA5-D5WzpTIY.mjs +0 -1
- package/dist/history-J4QRNGRO-DUTsR2Sf.mjs +0 -1
- package/dist/hostname-BK6HG2DE-zmNkhqtV.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-Ux5cbjMV.mjs +0 -1
- package/dist/init-Ccjx3YjD.mjs +0 -1
- package/dist/init-DOTyF3_B.mjs +0 -1
- package/dist/init-Dc2dCgGt.mjs +0 -255
- package/dist/init-DeV-MdCs.mjs +0 -120
- package/dist/join-GG2LDHE5-B6C3-ghI.mjs +0 -1
- package/dist/jq-ODXZBPLY-Uj_VahOC.mjs +0 -1
- package/dist/keepalive-CZzB5k1h.mjs +0 -2
- package/dist/ln-4TRFBYAT-DiYK6FgR.mjs +0 -1
- package/dist/loader-Bveym9GJ.mjs +0 -1
- package/dist/loader-C3jzK-Dy.mjs +0 -3
- package/dist/ls-KSXFZCWH-B0la1Q-P.mjs +0 -1
- package/dist/md5sum-INMIK4DX-DAG8dmoX.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-CRMB4_AE.mjs +0 -1
- package/dist/mv-Z6MORUFL-1iTO8NY5.mjs +0 -1
- package/dist/nl-U5YJDM32-IRiMqQcZ.mjs +0 -1
- package/dist/od-VJEF2UR5-PasvdXXR.mjs +0 -1
- package/dist/paste-7N6AFSDS-C3M5_YM6.mjs +0 -1
- package/dist/paths-BA1xev5m.mjs +0 -1
- package/dist/paths-DtQI2_ER.mjs +0 -2
- package/dist/preview-BTFflPaA.mjs +0 -1
- package/dist/preview-BuXqi6nl.mjs +0 -3
- package/dist/printf-CX64KX2P-uTOF6Zpa.mjs +0 -1
- package/dist/public/assets/ActivityModeContent-Ccu_n0bV.js +0 -2
- package/dist/public/assets/DocumentContext-C1msvcHp.js +0 -5
- package/dist/public/assets/GraphPanel-CJ_U3W3L.js +0 -46
- package/dist/public/assets/McpConsentDialogBody-Csjet19t.js +0 -1
- package/dist/public/assets/PageListContext-B5SWnlyE.js +0 -278
- package/dist/public/assets/SourceEditor-OFesfBB2.js +0 -3
- package/dist/public/assets/__vite-browser-external-Dz2JgTKm.js +0 -1
- package/dist/public/assets/chunk-DECur_0Z.js +0 -1
- package/dist/public/assets/clipboard-DAcKCHl1.js +0 -32
- package/dist/public/assets/dialog-CtSN0d2b.js +0 -45
- package/dist/public/assets/index-CwFTGDhe.js +0 -1843
- package/dist/public/assets/index-DjR45Lon.css +0 -1
- package/dist/public/assets/propagation-api-Bugyj7xy.js +0 -1
- package/dist/public/assets/telemetry-impl-D8K_lJGH.js +0 -2
- package/dist/public/assets/toggle-group-LDOO6zaV.js +0 -1
- package/dist/public/assets/tooltip-D0MnQ7ZX.js +0 -1
- package/dist/pwd-D4OZ7N27-DNkGMjtD.mjs +0 -1
- package/dist/readlink-MI4GCHJF-DRVZBAvY.mjs +0 -1
- package/dist/rev-XOSYPP45-q2MQLs41.mjs +0 -1
- package/dist/rg-FOQSCCX3-Cssz8GNh.mjs +0 -1
- package/dist/rm-RTZG23RL-fjvVauiI.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-C13HY1h7.mjs +0 -1
- package/dist/sed-VFTTATXJ-DO49xc40.mjs +0 -1
- package/dist/seq-RN5ZUASB-D9r6kc_Z.mjs +0 -1
- package/dist/server-lock-n3Y5JWNv-3o7br8XE.mjs +0 -2
- package/dist/server-lock-n3Y5JWNv-DXpg9_eU.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-4uBt63v6.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-_uaXSgBK.mjs +0 -1
- package/dist/sleep-VZFPZFWA-CS7jDpXp.mjs +0 -1
- package/dist/sort-DCNRDA7U-Dmp_2ZoH.mjs +0 -1
- package/dist/split-SITCSYCZ-Cu9ifXuc.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-D1Xq8d4g.mjs +0 -1
- package/dist/src-CCtbSzLe.mjs +0 -1
- package/dist/start-D7mCFrVn.mjs +0 -1
- package/dist/start-RnYkhoRl.mjs +0 -2
- package/dist/stat-BT5A227F-Dqepjl-k.mjs +0 -1
- package/dist/strings-7PLOGTPD-g6FhPS64.mjs +0 -1
- package/dist/tac-SJGXQ4T2-DczI7HKk.mjs +0 -1
- package/dist/tail-S5ULNTJU-Bk22kVUG.mjs +0 -1
- package/dist/tar-ANUBEFJY-1lwT6ndQ.mjs +0 -1
- package/dist/tee-O7VXZDCO-Ftqr8Jad.mjs +0 -1
- package/dist/time-DEUO3QV2-BtzQ0nVf.mjs +0 -1
- package/dist/timeout-VRKMCG72-Cpzi9cz-.mjs +0 -1
- package/dist/touch-DX2IJOQ4-ewCHfbB3.mjs +0 -1
- package/dist/tr-2HXZRDSW-DrrobhxR.mjs +0 -1
- package/dist/tree-LYXBS7DC-DZnTMKSh.mjs +0 -1
- package/dist/true-WHJNXCHG-BaLssNp9.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-BOmSL08U.mjs +0 -1
- package/dist/uniq-SUNANL47-Cn_JDmUJ.mjs +0 -1
- package/dist/wc-TQB3VNOX-DkOBrQlr.mjs +0 -1
- package/dist/which-XZHEH76L-DxZJ58G5.mjs +0 -1
- package/dist/whoami-DGKU3D2X-Bn1LP0m_.mjs +0 -1
- package/dist/wrapper-BTT6637Z.mjs +0 -7
- package/dist/xan-BXDXYEIB-_Vtao535.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-6vlhfSF-.mjs +0 -1
- package/dist/xargs-I6EZUCYF-dHdg4qaj.mjs +0 -1
- package/dist/yq-MJMAR36V-pRBq87Ya.mjs +0 -1
- /package/dist/public/assets/{go-DatQmDtN.js → go-a33xvodr.js} +0 -0
- /package/dist/public/assets/{shell-7yok6dsz.js → shell-40VLet8r.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-CSlwavrd.js → w3c-keyname-Dfj2imOv.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{t as e}from"./chunk-DXB73IDG-
|
|
1
|
+
import{t as e}from"./chunk-DXB73IDG-DIKSLkPq.mjs";function t(){let e=[{prop:`Function`,target:globalThis,violationType:`function_constructor`,strategy:`throw`,reason:`Function constructor allows arbitrary code execution`},{prop:`eval`,target:globalThis,violationType:`eval`,strategy:`throw`,reason:`eval() allows arbitrary code execution`},{prop:`setTimeout`,target:globalThis,violationType:`setTimeout`,strategy:`throw`,reason:`setTimeout with string argument allows code execution`},{prop:`setInterval`,target:globalThis,violationType:`setInterval`,strategy:`throw`,reason:`setInterval with string argument allows code execution`},{prop:`setImmediate`,target:globalThis,violationType:`setImmediate`,strategy:`throw`,reason:`setImmediate could be used to escape sandbox context`},{prop:`env`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.env could leak sensitive environment variables`,allowedKeys:new Set([`NODE_V8_COVERAGE`,`NODE_DEBUG`,`NODE_DEBUG_NATIVE`,`NODE_COMPILE_CACHE`,`WATCH_REPORT_DEPENDENCIES`,`FORCE_COLOR`,`DEBUG`,`UNDICI_NO_FG`,`JEST_WORKER_ID`,`__MINIMATCH_TESTING_PLATFORM__`,`LOG_TOKENS`,`LOG_STREAM`])},{prop:`binding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process.binding provides access to native Node.js modules`},{prop:`_linkedBinding`,target:process,violationType:`process_binding`,strategy:`throw`,reason:`process._linkedBinding provides access to native Node.js modules`},{prop:`dlopen`,target:process,violationType:`process_dlopen`,strategy:`throw`,reason:`process.dlopen allows loading native addons`},{prop:`getBuiltinModule`,target:process,violationType:`process_get_builtin_module`,strategy:`throw`,reason:`process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)`},{prop:`exit`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.exit could terminate the interpreter`},{prop:`abort`,target:process,violationType:`process_exit`,strategy:`throw`,reason:`process.abort could crash the interpreter`},{prop:`kill`,target:process,violationType:`process_kill`,strategy:`throw`,reason:`process.kill could signal other processes`},{prop:`setuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setuid could escalate privileges`},{prop:`setgid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgid could escalate privileges`},{prop:`seteuid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.seteuid could escalate effective user privileges`},{prop:`setegid`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setegid could escalate effective group privileges`},{prop:`initgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.initgroups could modify supplementary group IDs`},{prop:`setgroups`,target:process,violationType:`process_setuid`,strategy:`throw`,reason:`process.setgroups could modify supplementary group IDs`},{prop:`umask`,target:process,violationType:`process_umask`,strategy:`throw`,reason:`process.umask could modify file creation permissions`},{prop:`argv`,target:process,violationType:`process_argv`,strategy:`throw`,reason:`process.argv may contain secrets in CLI arguments`},{prop:`cwd`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.cwd could disclose real host working directory path`},{prop:`chdir`,target:process,violationType:`process_chdir`,strategy:`throw`,reason:`process.chdir could confuse the interpreter's CWD tracking`},{prop:`report`,target:process,violationType:`process_report`,strategy:`throw`,reason:`process.report could disclose full environment, host paths, and system info`},{prop:`loadEnvFile`,target:process,violationType:`process_env`,strategy:`throw`,reason:`process.loadEnvFile could load env files bypassing env proxy`},{prop:`setUncaughtExceptionCaptureCallback`,target:process,violationType:`process_exception_handler`,strategy:`throw`,reason:`setUncaughtExceptionCaptureCallback could intercept security errors`},{prop:`send`,target:process,violationType:`process_send`,strategy:`throw`,reason:`process.send could communicate with parent process in IPC contexts`},{prop:`channel`,target:process,violationType:`process_channel`,strategy:`throw`,reason:`process.channel could access IPC channel to parent process`},{prop:`cpuUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.cpuUsage could enable timing side-channel attacks`},{prop:`memoryUsage`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.memoryUsage could enable timing side-channel attacks`},{prop:`hrtime`,target:process,violationType:`process_timing`,strategy:`throw`,reason:`process.hrtime could enable timing side-channel attacks`},{prop:`WeakRef`,target:globalThis,violationType:`weak_ref`,strategy:`throw`,reason:`WeakRef could be used to leak references outside sandbox`},{prop:`FinalizationRegistry`,target:globalThis,violationType:`finalization_registry`,strategy:`throw`,reason:`FinalizationRegistry could be used to leak references outside sandbox`},{prop:`Reflect`,target:globalThis,violationType:`reflect`,strategy:`freeze`,reason:`Reflect provides introspection capabilities`},{prop:`Proxy`,target:globalThis,violationType:`proxy`,strategy:`throw`,reason:`Proxy allows intercepting and modifying object behavior`},{prop:`WebAssembly`,target:globalThis,violationType:`webassembly`,strategy:`throw`,reason:`WebAssembly allows executing arbitrary compiled code`},{prop:`SharedArrayBuffer`,target:globalThis,violationType:`shared_array_buffer`,strategy:`throw`,reason:`SharedArrayBuffer could enable side-channel communication or timing attacks`},{prop:`Atomics`,target:globalThis,violationType:`atomics`,strategy:`throw`,reason:`Atomics could enable side-channel communication or timing attacks`},{prop:`performance`,target:globalThis,violationType:`performance_timing`,strategy:`throw`,reason:`performance.now() provides sub-millisecond timing for side-channel attacks`},{prop:`stdout`,target:process,violationType:`process_stdout`,strategy:`throw`,reason:`process.stdout could bypass interpreter output to write to host stdout`},{prop:`stderr`,target:process,violationType:`process_stderr`,strategy:`throw`,reason:`process.stderr could bypass interpreter output to write to host stderr`},{prop:`__defineGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineGetter__ allows prototype pollution via getter injection`},{prop:`__defineSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__defineSetter__ allows prototype pollution via setter injection`},{prop:`__lookupGetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupGetter__ enables introspection for prototype pollution attacks`},{prop:`__lookupSetter__`,target:Object.prototype,violationType:`prototype_mutation`,strategy:`throw`,reason:`__lookupSetter__ enables introspection for prototype pollution attacks`},{prop:`JSON`,target:globalThis,violationType:`json_mutation`,strategy:`freeze`,reason:`Freeze JSON to prevent mutation of parsing/serialization`},{prop:`Math`,target:globalThis,violationType:`math_mutation`,strategy:`freeze`,reason:`Freeze Math to prevent mutation of math utilities`}];try{let t=Object.getPrototypeOf(async()=>{}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async()=>{}),violationType:`async_function_constructor`,strategy:`throw`,reason:`AsyncFunction constructor allows arbitrary async code execution`})}catch{}try{let t=Object.getPrototypeOf(function*(){}).constructor;t&&t!==Function&&e.push({prop:`constructor`,target:Object.getPrototypeOf(function*(){}),violationType:`generator_function_constructor`,strategy:`throw`,reason:`GeneratorFunction constructor allows arbitrary generator code execution`})}catch{}try{let t=Object.getPrototypeOf(async function*(){}).constructor;t&&t!==Function&&t!==Object.getPrototypeOf(async()=>{}).constructor&&e.push({prop:`constructor`,target:Object.getPrototypeOf(async function*(){}),violationType:`async_generator_function_constructor`,strategy:`throw`,reason:`AsyncGeneratorFunction constructor allows arbitrary async generator code execution`})}catch{}return e.filter(e=>{try{return e.target[e.prop]!==void 0}catch{return!1}})}var n=typeof __BROWSER__<`u`&&__BROWSER__;function r(){return typeof crypto<`u`&&crypto.randomUUID?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}var i=null;if(!n)try{let{AsyncLocalStorage:t}=e(`node:async_hooks`);i=t}catch{}var a=`
|
|
2
2
|
|
|
3
3
|
This is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com`,o=class extends Error{violation;constructor(e,t){super(e+a),this.violation=t,this.name=`SecurityViolationError`}},s=!n&&i?new i:null,c=1e3;function l(e,t,...n){return s.run(e,()=>t(...n))}var u={enabled:!0,auditMode:!1};function d(e){return e===void 0?{...u,enabled:!1}:typeof e==`boolean`?{...u,enabled:e}:{...u,...e}}var f=class i{static instance=null;static importHooksRegistered=!1;static trustedExecutionDepth=new Map;config;refCount=0;patchFailures=[];activeExecutionIds=new Set;contextCache=new Map;originalDescriptors=[];violations=[];activationTime=0;totalActiveTimeMs=0;constructor(e){this.config=e}static getInstance(e){let t=d(e);if(!i.instance)i.instance=new i(t);else{let e=i.instance.config;if(t.enabled!==e.enabled||t.auditMode!==e.auditMode)throw Error(`DefenseInDepthBox config conflict: requested {enabled: ${t.enabled}, auditMode: ${t.auditMode}} but singleton already has {enabled: ${e.enabled}, auditMode: ${e.auditMode}}. All Bash instances must use the same defense-in-depth security settings, or call DefenseInDepthBox.resetInstance() between incompatible configurations.`)}return i.instance}static resetInstance(){i.instance&&=(i.instance.forceDeactivate(),null),i.trustedExecutionDepth.clear()}static isInSandboxedContext(){return s?s?.getStore()?.sandboxActive===!0:!1}static getCurrentExecutionId(){if(s)return s?.getStore()?.executionId}static enterTrustedScope(e){let t=i.trustedExecutionDepth.get(e)??0;i.trustedExecutionDepth.set(e,t+1)}static leaveTrustedScope(e){let t=i.trustedExecutionDepth.get(e);if(t){if(t===1){i.trustedExecutionDepth.delete(e);return}i.trustedExecutionDepth.set(e,t-1)}}static isTrustedScopeActive(e){return e?(i.trustedExecutionDepth.get(e)??0)>0:!1}isExecutionIdActive(e){return this.activeExecutionIds.has(e)}getCachedContext(e){let t=this.contextCache.get(e);return t||(t={sandboxActive:!0,executionId:e},this.contextCache.set(e,t)),t}getPreferredActiveExecutionId(){if(this.activeExecutionIds.size!==0)for(let e of this.activeExecutionIds)return e}static bindCurrentContext(e){if(!s)return e;let t=i.instance,n=s.getStore(),r=n?.sandboxActive===!0?n.executionId:t?.getPreferredActiveExecutionId();if(!r)return e;let a=t?.getCachedContext(r)??{sandboxActive:!0,executionId:r};return((...t)=>{let n=i.instance;if(!(n&&!n.isExecutionIdActive(r)&&(n.recordViolation(`bound_callback_after_deactivate`,`bound callback`,`Bound callback blocked after originating execution was deactivated`),!n.config.auditMode)))return l(a,e,...t)})}isEnabled(){return this.config.enabled===!0&&s!==null&&!n}updateConfig(e){this.config={...this.config,...e}}activate(){if(n||!this.config.enabled||!s){let e=r(),t=!1;return{run:e=>t?Promise.reject(Error(`DefenseInDepthBox handle is deactivated and cannot run new work`)):e(),deactivate:()=>{t=!0},executionId:e}}this.refCount++,this.refCount===1&&(this.applyPatches(),this.activationTime=Date.now());let e=r(),t=!1;return{run:n=>t?Promise.reject(Error(`DefenseInDepthBox handle is deactivated and cannot run new work`)):(this.activeExecutionIds.add(e),s.run({sandboxActive:!0,executionId:e},n)),deactivate:()=>{t||(t=!0,this.activeExecutionIds.delete(e),this.contextCache.delete(e),this.refCount--,this.refCount===0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.refCount<0&&(this.refCount=0))},executionId:e}}forceDeactivate(){this.refCount>0&&(this.restorePatches(),this.totalActiveTimeMs+=Date.now()-this.activationTime),this.activeExecutionIds.clear(),this.contextCache.clear(),this.refCount=0}isActive(){return this.refCount>0}getStats(){return{violationsBlocked:this.violations.length,violations:[...this.violations],activeTimeMs:this.totalActiveTimeMs+(this.refCount>0?Date.now()-this.activationTime:0),refCount:this.refCount}}getPatchFailures(){return[...this.patchFailures]}clearViolations(){this.violations=[]}getPathForTarget(e,t){return e===globalThis?`globalThis.${t}`:e===process?`process.${t}`:e===Error?`Error.${t}`:e===Function.prototype?`Function.prototype.${t}`:e===Object.prototype?`Object.prototype.${t}`:`<object>.${t}`}static runTrusted(e){if(!s)return e();let t=s.getStore();if(!t)return e();let{executionId:n}=t;return s.run({...t,trusted:!0},()=>{i.enterTrustedScope(n);try{let t=e();return typeof t==`object`&&t&&`finally`in t&&typeof t.finally==`function`?t.finally(()=>{i.leaveTrustedScope(n)}):(i.leaveTrustedScope(n),t)}catch(e){throw i.leaveTrustedScope(n),e}})}static async runTrustedAsync(e){if(!s)return e();let t=s.getStore();if(!t)return e();let{executionId:n}=t;return s.run({...t,trusted:!0},async()=>{i.enterTrustedScope(n);try{return await e()}finally{i.leaveTrustedScope(n)}})}shouldBlock(){if(n||this.config.auditMode||!s)return!1;let e=s?.getStore();return!(e?.sandboxActive!==!0||e.trusted||i.isTrustedScopeActive(e.executionId))}recordViolation(e,t,n){let r={timestamp:Date.now(),type:e,message:n,path:t,stack:Error().stack,executionId:s?.getStore()?.executionId};if(this.violations.length<c&&this.violations.push(r),this.config.onViolation)try{this.config.onViolation(r)}catch(e){console.debug(`[DefenseInDepthBox] onViolation callback threw:`,e instanceof Error?e.message:e)}return r}createBlockingProxy(e,t,n){let r=this;return new Proxy(e,{apply(e,i,a){if(r.shouldBlock()){let e=`${t} is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} called (audit mode)`),Reflect.apply(e,i,a)},construct(e,i,a){if(r.shouldBlock()){let e=`${t} constructor is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} constructor called (audit mode)`),Reflect.construct(e,i,a)}})}createBlockingObjectProxy(e,t,n,r){let i=this;return new Proxy(e,{get(e,a,c){if(i.shouldBlock()){if(r&&typeof a==`string`&&r.has(a))return Reflect.get(e,a,c);let s=`${t}.${String(a)}`,l=`${s} is blocked during script execution`;throw new o(l,i.recordViolation(n,s,l))}if(i.config.auditMode&&s?.getStore()?.sandboxActive===!0){let e=`${t}.${String(a)}`;i.recordViolation(n,e,`${e} accessed (audit mode)`)}return Reflect.get(e,a,c)},set(e,r,a,s){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} modification is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.set(e,r,a,s)},ownKeys(e){if(i.shouldBlock()){let e=`${t} enumeration is blocked during script execution`;throw new o(e,i.recordViolation(n,t,e))}return Reflect.ownKeys(e)},getOwnPropertyDescriptor(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} descriptor access is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.getOwnPropertyDescriptor(e,r)},has(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} existence check is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.has(e,r)},deleteProperty(e,r){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} deletion is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.deleteProperty(e,r)},setPrototypeOf(e,r){if(i.shouldBlock()){let e=`${t} setPrototypeOf is blocked during script execution`;throw new o(e,i.recordViolation(n,t,e))}return Reflect.setPrototypeOf(e,r)},defineProperty(e,r,a){if(i.shouldBlock()){let e=`${t}.${String(r)}`,a=`${e} defineProperty is blocked during script execution`;throw new o(a,i.recordViolation(n,e,a))}return Reflect.defineProperty(e,r,a)}})}applyPatches(){this.patchFailures=[];let e=t(),n=new Set([`process_send`,`process_channel`,`process_stdout`,`process_stderr`]);for(let t of e)n.has(t.violationType)||this.applyPatch(t);this.protectConstructorChain(),this.protectErrorPrepareStackTrace(),this.protectPromiseThen(),this.protectDynamicImport(),this.protectModuleLoad(),this.protectModuleResolveFilename(),this.protectProcessMainModule(),this.protectProcessExecPath(),this.lockWellKnownSymbols(),this.protectProxyRevocable();let r=[`Function.prototype.constructor`,`Module._load`],i=this.patchFailures.filter(e=>r.includes(e));if(i.length>0)throw this.restorePatches(),Error(`DefenseInDepthBox: critical patches failed: ${i.join(`, `)}`)}protectConstructorChain(){this.patchPrototypeConstructor(Function.prototype,`Function.prototype.constructor`,`function_constructor`);try{let e=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,`AsyncFunction.prototype.constructor`,`async_function_constructor`)}catch(e){this.patchFailures.push(`AsyncFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch AsyncFunction.prototype.constructor:`,e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(function*(){}).constructor;e&&e!==Function&&this.patchPrototypeConstructor(e.prototype,`GeneratorFunction.prototype.constructor`,`generator_function_constructor`)}catch(e){this.patchFailures.push(`GeneratorFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch GeneratorFunction.prototype.constructor:`,e instanceof Error?e.message:e)}try{let e=Object.getPrototypeOf(async function*(){}).constructor,t=Object.getPrototypeOf(async()=>{}).constructor;e&&e!==Function&&e!==t&&this.patchPrototypeConstructor(e.prototype,`AsyncGeneratorFunction.prototype.constructor`,`async_generator_function_constructor`)}catch(e){this.patchFailures.push(`AsyncGeneratorFunction.prototype.constructor`),console.debug(`[DefenseInDepthBox] Could not patch AsyncGeneratorFunction.prototype.constructor:`,e instanceof Error?e.message:e)}}protectErrorPrepareStackTrace(){let e=this;try{let t=Object.getOwnPropertyDescriptor(Error,`prepareStackTrace`);this.originalDescriptors.push({target:Error,prop:`prepareStackTrace`,descriptor:t});let n=t?.value;Object.defineProperty(Error,`prepareStackTrace`,{get(){return n},set(t){if(e.shouldBlock()){let t=`Error.prepareStackTrace modification is blocked during script execution`;throw new o(t,e.recordViolation(`error_prepare_stack_trace`,`Error.prepareStackTrace`,t))}e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`error_prepare_stack_trace`,`Error.prepareStackTrace`,`Error.prepareStackTrace set (audit mode)`),n=t},configurable:!0})}catch(e){this.patchFailures.push(`Error.prepareStackTrace`),console.debug(`[DefenseInDepthBox] Could not protect Error.prepareStackTrace:`,e instanceof Error?e.message:e)}}protectPromiseThen(){let e=this;try{let t=function(...e){return s.run(this.captured,()=>{if(!this.box.isExecutionIdActive(this.executionId)){if(this.box.recordViolation(`promise_then_after_deactivate`,`Promise.then`,`Promise.then callback is blocked after defense deactivation`),this.box.config.auditMode)return Reflect.apply(this.cb,void 0,e);if(this.kind===`fulfilled`)return e[0];throw e[0]}return Reflect.apply(this.cb,void 0,e)})},n=Object.getOwnPropertyDescriptor(Promise.prototype,`then`);this.originalDescriptors.push({target:Promise.prototype,prop:`then`,descriptor:n});let r=n?.value;if(typeof r!=`function`)return;Object.defineProperty(Promise.prototype,`then`,{value:function(n,i){if(!s)return Reflect.apply(r,this,[n,i]);let a=s.getStore(),o=a?.sandboxActive===!0&&a.trusted!==!0?a.executionId:void 0;if(!o)return Reflect.apply(r,this,[n,i]);let c=e.getCachedContext(o),l=(n,r)=>typeof n==`function`?t.bind({box:e,executionId:o,captured:c,cb:n,kind:r}):n;return Reflect.apply(r,this,[l(n,`fulfilled`),l(i,`rejected`)])},writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Promise.prototype.then`),console.debug(`[DefenseInDepthBox] Could not protect Promise.prototype.then:`,e instanceof Error?e.message:e)}}patchPrototypeConstructor(e,t,n){let r=this;try{let i=Object.getOwnPropertyDescriptor(e,`constructor`);this.originalDescriptors.push({target:e,prop:`constructor`,descriptor:i});let a=i?.value;Object.defineProperty(e,`constructor`,{get(){if(r.shouldBlock()){let e=`${t} access is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}return r.config.auditMode&&s?.getStore()?.sandboxActive===!0&&r.recordViolation(n,t,`${t} accessed (audit mode)`),a},set(e){if(r.shouldBlock()){let e=`${t} modification is blocked during script execution`;throw new o(e,r.recordViolation(n,t,e))}Object.defineProperty(this,`constructor`,{value:e,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(t),console.debug(`[DefenseInDepthBox] Could not patch ${t}:`,e instanceof Error?e.message:e)}}protectProcessMainModule(){if(typeof process>`u`)return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,`mainModule`);this.originalDescriptors.push({target:process,prop:`mainModule`,descriptor:t});let n=t?.value;n!==void 0&&Object.defineProperty(process,`mainModule`,{get(){if(e.shouldBlock()){let t=`process.mainModule access is blocked during script execution`;throw new o(t,e.recordViolation(`process_main_module`,`process.mainModule`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`process_main_module`,`process.mainModule`,`process.mainModule accessed (audit mode)`),n},set(t){if(e.shouldBlock()){let t=`process.mainModule modification is blocked during script execution`;throw new o(t,e.recordViolation(`process_main_module`,`process.mainModule`,t))}Object.defineProperty(process,`mainModule`,{value:t,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(`process.mainModule`),console.debug(`[DefenseInDepthBox] Could not protect process.mainModule:`,e instanceof Error?e.message:e)}}protectProcessExecPath(){if(typeof process>`u`)return;let e=this;try{let t=Object.getOwnPropertyDescriptor(process,`execPath`);this.originalDescriptors.push({target:process,prop:`execPath`,descriptor:t});let n=t?.value??process.execPath;Object.defineProperty(process,`execPath`,{get(){if(e.shouldBlock()){let t=`process.execPath access is blocked during script execution`;throw new o(t,e.recordViolation(`process_exec_path`,`process.execPath`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`process_exec_path`,`process.execPath`,`process.execPath accessed (audit mode)`),n},set(t){if(e.shouldBlock()){let t=`process.execPath modification is blocked during script execution`;throw new o(t,e.recordViolation(`process_exec_path`,`process.execPath`,t))}Object.defineProperty(process,`execPath`,{value:t,writable:!0,configurable:!0})},configurable:!0})}catch(e){this.patchFailures.push(`process.execPath`),console.debug(`[DefenseInDepthBox] Could not protect process.execPath:`,e instanceof Error?e.message:e)}}lockWellKnownSymbols(){let e=(e,t)=>{try{let n=Object.getOwnPropertyDescriptor(e,t);if(n?.configurable){if(`value`in n){Object.defineProperty(e,t,{...n,configurable:!1,writable:!1});return}Object.defineProperty(e,t,{...n,configurable:!1})}}catch{}};for(let t of[Array,Map,Set,RegExp,Promise])e(t,Symbol.species);for(let t of[Array.prototype,String.prototype,Map.prototype,Set.prototype])e(t,Symbol.iterator);e(Symbol.prototype,Symbol.toPrimitive),e(Date.prototype,Symbol.toPrimitive);for(let t of[Symbol.match,Symbol.matchAll,Symbol.replace,Symbol.search,Symbol.split])e(RegExp.prototype,t);e(Function.prototype,Symbol.hasInstance),e(Array.prototype,Symbol.unscopables);for(let t of[Map.prototype,Set.prototype,Promise.prototype,ArrayBuffer.prototype])e(t,Symbol.toStringTag);try{let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);this.originalDescriptors.push({target:Error,prop:`stackTraceLimit`,descriptor:e}),Object.defineProperty(Error,`stackTraceLimit`,{value:Error.stackTraceLimit,writable:!1,configurable:!0})}catch{}}protectProxyRevocable(){let e=this;try{let t=Proxy.revocable;if(typeof t!=`function`)return;let n=Object.getOwnPropertyDescriptor(Proxy,`revocable`);this.originalDescriptors.push({target:Proxy,prop:`revocable`,descriptor:n}),Object.defineProperty(Proxy,`revocable`,{value:function(n,r){if(e.shouldBlock()){let t=`Proxy.revocable is blocked during script execution`;throw new o(t,e.recordViolation(`proxy`,`Proxy.revocable`,t))}return e.config.auditMode&&s?.getStore()?.sandboxActive===!0&&e.recordViolation(`proxy`,`Proxy.revocable`,`Proxy.revocable called (audit mode)`),t(n,r)},writable:!1,configurable:!0})}catch(e){this.patchFailures.push(`Proxy.revocable`),console.debug(`[DefenseInDepthBox] Could not protect Proxy.revocable:`,e instanceof Error?e.message:e)}}protectDynamicImport(){if(!(n||i.importHooksRegistered))try{let t=this,n=e(`node:module`),r=new Set;for(let e of n.builtinModules??[]){let t=e.startsWith(`node:`)?e.slice(5):e;r.add(t);let n=t.indexOf(`/`);n>0&&r.add(t.slice(0,n))}let a=e=>{if(e.startsWith(`./`)||e.startsWith(`../`)||e.startsWith(`/`)||e.startsWith(`file:`)||e.startsWith(`data:`)||e.startsWith(`blob:`)||e.startsWith(`http:`)||e.startsWith(`https:`))return!1;let t=e.startsWith(`node:`)?e.slice(5):e;if(!t)return!1;if(typeof n.isBuiltin==`function`&&n.isBuiltin(t)||r.has(t))return!0;let i=t.indexOf(`/`);return i>0&&r.has(t.slice(0,i))},c=()=>{let e=s?.getStore();return t.config.auditMode===!0&&e?.sandboxActive===!0&&e.trusted!==!0&&!i.isTrustedScopeActive(e.executionId)};if(typeof n.registerHooks==`function`){n.registerHooks({resolve(e,n,r){if(e.startsWith(`data:`)||e.startsWith(`blob:`))throw Error(`dynamic import of ${e.startsWith(`data:`)?`data:`:`blob:`} URLs is blocked by defense-in-depth`);if(a(e)){let n=`import(${e})`,r=`dynamic import of Node.js builtin '${e}' is blocked during script execution`;if(t.shouldBlock())throw new o(r,t.recordViolation(`dynamic_import_builtin`,n,r));c()&&t.recordViolation(`dynamic_import_builtin`,n,`dynamic import of Node.js builtin '${e}' called (audit mode)`)}return r(e,n)}}),i.importHooksRegistered=!0;return}if(typeof n.register==`function`){let e=[`export async function resolve(specifier, context, nextResolve) {`,` if (specifier.startsWith("data:") || specifier.startsWith("blob:")) {`,` throw new Error("dynamic import of " + (specifier.startsWith("data:") ? "data:" : "blob:") + " URLs is blocked by defense-in-depth");`,` }`,` return nextResolve(specifier, context);`,`}`].join(`
|
|
4
4
|
`);n.register(`data:text/javascript,${encodeURIComponent(e)}`),i.importHooksRegistered=!0}}catch(e){console.debug(`[DefenseInDepthBox] Could not register import() hooks:`,e instanceof Error?e.message:e)}}protectModuleLoad(){if(!n)try{let t=null;if(typeof process<`u`){let e=process.mainModule;e&&typeof e==`object`&&(t=e.constructor)}if(!t&&typeof e<`u`&&typeof e.main<`u`&&(t=e.main.constructor),!t||typeof t._load!=`function`)return;let n=t._load,r=Object.getOwnPropertyDescriptor(t,`_load`);this.originalDescriptors.push({target:t,prop:`_load`,descriptor:r});let i=this.createBlockingProxy(n,`Module._load`,`module_load`);Object.defineProperty(t,`_load`,{value:i,writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Module._load`),console.debug(`[DefenseInDepthBox] Could not protect Module._load:`,e instanceof Error?e.message:e)}}protectModuleResolveFilename(){if(!n)try{let t=null;if(typeof process<`u`){let e=process.mainModule;e&&typeof e==`object`&&(t=e.constructor)}if(!t&&typeof e<`u`&&typeof e.main<`u`&&(t=e.main.constructor),!t||typeof t._resolveFilename!=`function`)return;let n=t._resolveFilename,r=Object.getOwnPropertyDescriptor(t,`_resolveFilename`);this.originalDescriptors.push({target:t,prop:`_resolveFilename`,descriptor:r});let i=this.createBlockingProxy(n,`Module._resolveFilename`,`module_resolve_filename`);Object.defineProperty(t,`_resolveFilename`,{value:i,writable:!0,configurable:!0})}catch(e){this.patchFailures.push(`Module._resolveFilename`),console.debug(`[DefenseInDepthBox] Could not protect Module._resolveFilename:`,e instanceof Error?e.message:e)}}applyPatch(e){let{target:t,prop:n,violationType:r,strategy:i}=e;try{let a=t[n];if(a===void 0)return;let o=Object.getOwnPropertyDescriptor(t,n);if(this.originalDescriptors.push({target:t,prop:n,descriptor:o}),i===`freeze`)typeof a==`object`&&a&&Object.freeze(a);else{let i=this.getPathForTarget(t,n),o=typeof a==`function`?this.createBlockingProxy(a,i,r):this.createBlockingObjectProxy(a,i,r,e.allowedKeys);Object.defineProperty(t,n,{value:o,writable:!0,configurable:!0})}}catch(e){let r=this.getPathForTarget(t,n);this.patchFailures.push(r),console.debug(`[DefenseInDepthBox] Could not patch ${r}:`,e instanceof Error?e.message:e)}}restorePatches(){for(let e=this.originalDescriptors.length-1;e>=0;e--){let{target:t,prop:n,descriptor:r}=this.originalDescriptors[e];try{r?Object.defineProperty(t,n,r):delete t[n]}catch(e){let r=this.getPathForTarget(t,n);console.debug(`[DefenseInDepthBox] Could not restore ${r}:`,e instanceof Error?e.message:e)}}this.originalDescriptors=[]}};export{o as n,f as t};
|
|
5
|
-
//# sourceMappingURL=chunk-5QMZ5MUS-
|
|
5
|
+
//# sourceMappingURL=chunk-5QMZ5MUS-CAp625aG.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e,t}from"./chunk-74CEPOFO-
|
|
1
|
+
import{r as e,t}from"./chunk-74CEPOFO-BcZUJMO1.mjs";import{t as n}from"./chunk-HWKDQ44K-wgmyck2O.mjs";import{t as r}from"./chunk-X2AJGDEF-D5w6wtaX.mjs";var i={name:`stat`,summary:`display file or file system status`,usage:`stat [OPTION]... FILE...`,options:[`-c FORMAT use the specified FORMAT instead of the default`,` --help display this help and exit`]},a={format:{short:`c`,type:`string`}},o={name:`stat`,async execute(o,s){if(t(o))return e(i);let c=n(`stat`,o,a);if(!c.ok)return c.error;let l=c.result.flags.format??null,u=c.result.positional;if(u.length===0)return{stdout:``,stderr:`stat: missing operand
|
|
2
2
|
`,exitCode:1};let d=``,f=``,p=!1;for(let e of u){let t=s.fs.resolvePath(s.cwd,e);try{let n=await s.fs.stat(t);if(l){let t=l,i=n.mode.toString(8),a=r(n.mode,n.isDirectory);t=t.replace(/%n/g,e),t=t.replace(/%N/g,`'${e}'`),t=t.replace(/%s/g,String(n.size)),t=t.replace(/%F/g,n.isDirectory?`directory`:`regular file`),t=t.replace(/%a/g,i),t=t.replace(/%A/g,a),t=t.replace(/%u/g,`1000`),t=t.replace(/%U/g,`user`),t=t.replace(/%g/g,`1000`),t=t.replace(/%G/g,`group`),d+=`${t}
|
|
3
3
|
`}else{let t=n.mode.toString(8).padStart(4,`0`),i=r(n.mode,n.isDirectory);d+=` File: ${e}
|
|
4
4
|
`,d+=` Size: ${n.size} Blocks: ${Math.ceil(n.size/512)}
|
|
@@ -6,4 +6,4 @@ import{r as e,t}from"./chunk-74CEPOFO-D1bzz49u.mjs";import{t as n}from"./chunk-H
|
|
|
6
6
|
`,d+=`Modify: ${n.mtime.toISOString()}
|
|
7
7
|
`}}catch{f+=`stat: cannot stat '${e}': No such file or directory
|
|
8
8
|
`,p=!0}}return{stdout:d,stderr:f,exitCode:p?1:0}}},s={name:`stat`,flags:[{flag:`-c`,type:`value`,valueHint:`format`},{flag:`-L`,type:`boolean`}],needsArgs:!0};export{s as n,o as t};
|
|
9
|
-
//# sourceMappingURL=chunk-5QVNJEHU-
|
|
9
|
+
//# sourceMappingURL=chunk-5QVNJEHU-dbrKfPGl.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./chunk-EIZGF4BS-
|
|
2
|
-
//# sourceMappingURL=chunk-5V6VZH6T-
|
|
1
|
+
import{t as e}from"./chunk-EIZGF4BS-DOoQW9jQ.mjs";var t=e(`sha256sum`,`sha256`,`compute SHA256 message digest`),n={name:`sha256sum`,flags:[{flag:`-c`,type:`boolean`}],needsFiles:!0};export{n,t};
|
|
2
|
+
//# sourceMappingURL=chunk-5V6VZH6T-DMPvCPbn.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-3THT3N7L-
|
|
1
|
+
import{n as e}from"./chunk-3THT3N7L-DztAF386.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-BcZUJMO1.mjs";import{t as r}from"./chunk-HWKDQ44K-wgmyck2O.mjs";var i={name:`tr`,summary:`translate or delete characters`,usage:`tr [OPTION]... SET1 [SET2]`,options:[`-c, -C, --complement use the complement of SET1`,`-d, --delete delete characters in SET1`,`-s, --squeeze-repeats squeeze repeated characters`,` --help display this help and exit`],description:`SET syntax:
|
|
2
2
|
a-z character range
|
|
3
3
|
[:alnum:] all letters and digits
|
|
4
4
|
[:alpha:] all letters
|
|
@@ -18,4 +18,4 @@ import{n as e}from"./chunk-3THT3N7L-klp8GP84.mjs";import{r as t,t as n}from"./ch
|
|
|
18
18
|
`,exitCode:1};if(!d&&!f&&p.length<2)return{stdout:``,stderr:`tr: missing operand after SET1
|
|
19
19
|
`,exitCode:1};let m,h;try{m=o(p[0]),h=p.length>1?o(p[1]):``}catch(t){return{stdout:``,stderr:`${e(t.message)}
|
|
20
20
|
`,exitCode:1}}let g=c.stdin,_=e=>{let t=m.includes(e);return u?!t:t},v=``;if(d)for(let e of g)_(e)||(v+=e);else if(f&&p.length===1){let e=``;for(let t of g)_(t)&&t===e||(v+=t,e=t)}else{if(u){let e=h.length>0?h[h.length-1]:``;for(let t of g)m.includes(t)?v+=t:v+=e}else{let e=new Map;for(let t=0;t<m.length;t++){let n=t<h.length?h[t]:h[h.length-1];e.set(m[t],n)}for(let t of g)v+=e.get(t)??t}if(f){let e=``,t=``;for(let n of v)h.includes(n)&&n===t||(e+=n,t=n);v=e}}return{stdout:v,stderr:``,exitCode:0}}},l={name:`tr`,flags:[{flag:`-c`,type:`boolean`},{flag:`-C`,type:`boolean`},{flag:`-d`,type:`boolean`},{flag:`-s`,type:`boolean`}],stdinType:`text`,needsArgs:!0};export{c as n,l as t};
|
|
21
|
-
//# sourceMappingURL=chunk-62RKD26F-
|
|
21
|
+
//# sourceMappingURL=chunk-62RKD26F-B9la0pfD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,t}from"./chunk-74CEPOFO-
|
|
2
|
-
//# sourceMappingURL=chunk-64BAICW3-
|
|
1
|
+
import{r as e,t}from"./chunk-74CEPOFO-BcZUJMO1.mjs";import{n,r,t as i}from"./chunk-HDQ56CKY-MTQ75a8z.mjs";var a={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`]},o={name:`head`,async execute(o,s){if(t(o))return e(a);let c=n(o,`head`);if(!c.ok)return c.error;let{lines:l,bytes:u}=c.options;return r(s,c.options,`head`,e=>i(e,l,u))}},s={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{o as n,s as t};
|
|
2
|
+
//# sourceMappingURL=chunk-64BAICW3-D92CLSK-.mjs.map
|
|
@@ -20,4 +20,4 @@ Notes:
|
|
|
20
20
|
`}return{stdout:t,stderr:``,exitCode:0}}function t(e){return e.includes(`--help`)}function n(e,t){return{stdout:``,stderr:t.startsWith(`--`)?`${e}: unrecognized option '${t}'
|
|
21
21
|
`:`${e}: invalid option -- '${t.replace(/^-/,``)}'
|
|
22
22
|
`,exitCode:1}}export{n,e as r,t};
|
|
23
|
-
//# sourceMappingURL=chunk-74CEPOFO-
|
|
23
|
+
//# sourceMappingURL=chunk-74CEPOFO-BcZUJMO1.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
async function e(e,t,n){let{cmdName:r,allowStdinMarker:i=!0,stopOnError:a=!1,batchSize:o=100}=n;if(t.length===0)return{files:[{filename:``,content:e.stdin}],stderr:``,exitCode:0};let s=[],c=``,l=0;for(let n=0;n<t.length;n+=o){let u=t.slice(n,n+o),d=await Promise.all(u.map(async t=>{if(i&&t===`-`)return{filename:`-`,content:e.stdin,error:null};try{let n=e.fs.resolvePath(e.cwd,t);return{filename:t,content:await e.fs.readFile(n,`binary`),error:null}}catch{return{filename:t,content:``,error:`${r}: ${t}: No such file or directory
|
|
2
2
|
`}}}));for(let e of d)if(e.error){if(c+=e.error,l=1,a)return{files:s,stderr:c,exitCode:l}}else s.push({filename:e.filename,content:e.content})}return{files:s,stderr:c,exitCode:l}}async function t(t,n,r){let i=await e(t,n,{...r,stopOnError:!0});return i.exitCode===0?{ok:!0,content:i.files.map(e=>e.content).join(``)}:{ok:!1,error:{stdout:``,stderr:i.stderr,exitCode:i.exitCode}}}export{e as n,t};
|
|
3
|
-
//# sourceMappingURL=chunk-7L36YK2X-
|
|
3
|
+
//# sourceMappingURL=chunk-7L36YK2X-D7Z_Qw_C.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var e=new Set([`__proto__`,`constructor`,`prototype`]);new Set([...e,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]);function t(e,t){if(Array.isArray(e))throw TypeError(`${t}: expected object, got array`);if(Object.getPrototypeOf(e)!==null)throw TypeError(`${t}: expected null-prototype object, got prototypal object`)}function n(t){return!e.has(t)}function r(e,r,i){t(e,`safeSet`),n(r)&&(e[r]=i)}function i(e,n){return t(e,`safeHasOwn`),Object.hasOwn(e,n)}function a(e){let t=new WeakMap,n=e=>{if(typeof e!=`object`||!e||e instanceof Date)return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let r=[];t.set(e,r);for(let t of e)r.push(n(t));return r}let i=Object.create(null);t.set(e,i);for(let t of Object.keys(e))i[t]=n(e[t]);return i};return n(e)}function o(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:null}function s(e){return Object.assign(Object.create(null),e)}function c(e){return Object.assign(Object.create(null),e)}function l(...e){return Object.assign(Object.create(null),...e)}export{r as a,i as c,l as i,c as n,n as o,o as r,s,a as t};
|
|
2
|
-
//# sourceMappingURL=chunk-7TSDKFEO-
|
|
2
|
+
//# sourceMappingURL=chunk-7TSDKFEO-DUQhJkDy.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
var e={name:`pwd`,async execute(e,t){let n=!1;for(let t of e)if(t===`-P`)n=!0;else if(t===`-L`)n=!1;else{if(t===`--`)break;t.startsWith(`-`)}let r=t.cwd;if(n)try{r=await t.fs.realpath(t.cwd)}catch{}return{stdout:`${r}
|
|
2
2
|
`,stderr:``,exitCode:0}}},t={name:`pwd`,flags:[{flag:`-P`,type:`boolean`},{flag:`-L`,type:`boolean`}]};export{e as n,t};
|
|
3
|
-
//# sourceMappingURL=chunk-A4HU7SVR-
|
|
3
|
+
//# sourceMappingURL=chunk-A4HU7SVR-DKLaJeys.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{t as e}from"./chunk-44UOCSGV-
|
|
1
|
+
import{t as e}from"./chunk-44UOCSGV-CaFxJDHm.mjs";import{r as t,t as n}from"./chunk-74CEPOFO-BcZUJMO1.mjs";import{t as r}from"./chunk-HWKDQ44K-wgmyck2O.mjs";var i={name:`mv`,summary:`move (rename) files`,usage:`mv [OPTION]... SOURCE... DEST`,options:[`-f, --force do not prompt before overwriting`,`-n, --no-clobber do not overwrite an existing file`,`-v, --verbose explain what is being done`,` --help display this help and exit`]},a={force:{short:`f`,long:`force`,type:`boolean`},noClobber:{short:`n`,long:`no-clobber`,type:`boolean`},verbose:{short:`v`,long:`verbose`,type:`boolean`}},o={name:`mv`,async execute(o,s){if(n(o))return t(i);let c=r(`mv`,o,a);if(!c.ok)return c.error;c.result.flags.force;let l=c.result.flags.noClobber,u=c.result.flags.verbose,d=c.result.positional;if(d.length<2)return{stdout:``,stderr:`mv: missing destination file operand
|
|
2
2
|
`,exitCode:1};let f=d.pop()??``,p=d,m=s.fs.resolvePath(s.cwd,f),h=``,g=``,_=0,v=!1;try{v=(await s.fs.stat(m)).isDirectory}catch{}if(p.length>1&&!v)return{stdout:``,stderr:`mv: target '${f}' is not a directory
|
|
3
3
|
`,exitCode:1};for(let t of p)try{let e=s.fs.resolvePath(s.cwd,t),n=m;if(v){let e=t.split(`/`).pop()||t;n=m===`/`?`/${e}`:`${m}/${e}`}if(l)try{await s.fs.stat(n);continue}catch{}if(await s.fs.mv(e,n),u){let e=v?`${f}/${t.split(`/`).pop()||t}`:f;h+=`renamed '${t}' -> '${e}'
|
|
4
4
|
`}}catch(n){let r=e(n);r.includes(`ENOENT`)||r.includes(`no such file`)?g+=`mv: cannot stat '${t}': No such file or directory
|
|
5
5
|
`:g+=`mv: cannot move '${t}': ${r}
|
|
6
6
|
`,_=1}return{stdout:h,stderr:g,exitCode:_}}},s={name:`mv`,flags:[{flag:`-f`,type:`boolean`},{flag:`-n`,type:`boolean`},{flag:`-v`,type:`boolean`}],needsArgs:!0,minArgs:2};export{s as n,o as t};
|
|
7
|
-
//# sourceMappingURL=chunk-A4JSPFCI-
|
|
7
|
+
//# sourceMappingURL=chunk-A4JSPFCI-CEm2r8SB.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./chunk-5QMZ5MUS-
|
|
2
|
-
//# sourceMappingURL=chunk-A5O5YHGN-
|
|
1
|
+
import{t as e}from"./chunk-5QMZ5MUS-CAp625aG.mjs";var t=globalThis.setTimeout.bind(globalThis),n=globalThis.clearTimeout.bind(globalThis);globalThis.setInterval.bind(globalThis),globalThis.clearInterval.bind(globalThis);function r(t){return typeof t==`function`?e.bindCurrentContext(t):t}var i=((e,n,...i)=>t(r(e),n,...i)),a=n;export{a as n,i as t};
|
|
2
|
+
//# sourceMappingURL=chunk-A5O5YHGN-DvJz5Cpw.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{r as e,t}from"./chunk-74CEPOFO-
|
|
1
|
+
import{r as e,t}from"./chunk-74CEPOFO-BcZUJMO1.mjs";import{t as n}from"./chunk-HWKDQ44K-wgmyck2O.mjs";var r={name:`which`,summary:`locate a command`,usage:`which [-as] program ...`,options:[`-a List all instances of executables found`,`-s No output, just return 0 if found, 1 if not`,`--help display this help and exit`]},i={showAll:{short:`a`,type:`boolean`},silent:{short:`s`,type:`boolean`}},a={name:`which`,async execute(a,o){if(t(a))return e(r);let s=n(`which`,a,i);if(!s.ok)return s.error;let c=s.result.flags.showAll,l=s.result.flags.silent,u=s.result.positional;if(u.length===0)return{stdout:``,stderr:``,exitCode:1};let d=(o.env.get(`PATH`)||`/usr/bin:/bin`).split(`:`),f=``,p=!0;for(let e of u){let t=!1;for(let n of d){if(!n)continue;let r=o.fs.resolvePath(n,e);if(await o.fs.exists(r)&&(t=!0,l||(f+=`${r}
|
|
2
2
|
`),!c))break}t||(p=!1)}return{stdout:f,stderr:``,exitCode:p?0:1}}},o={name:`which`,flags:[{flag:`-a`,type:`boolean`},{flag:`-s`,type:`boolean`}],needsArgs:!0};export{o as n,a as t};
|
|
3
|
-
//# sourceMappingURL=chunk-A65PWWJC-
|
|
3
|
+
//# sourceMappingURL=chunk-A65PWWJC-DV6RO_es.mjs.map
|
|
@@ -4,4 +4,4 @@ var e={name:`seq`,async execute(e){let t=`
|
|
|
4
4
|
`,exitCode:1};if(o===0)return{stdout:``,stderr:`seq: invalid Zero increment value: '0'
|
|
5
5
|
`,exitCode:1};let c=[],l=e=>{let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1},u=Math.max(l(a),l(o),l(s)),d=1e5,f=0;if(o>0)for(let e=a;e<=s+1e-10&&!(f++>d);e+=o)c.push(u>0?e.toFixed(u):String(Math.round(e)));else for(let e=a;e>=s-1e-10&&!(f++>d);e+=o)c.push(u>0?e.toFixed(u):String(Math.round(e)));if(n&&c.length>0){let e=Math.max(...c.map(e=>e.replace(`-`,``).length));for(let t=0;t<c.length;t++){let n=c[t].startsWith(`-`),r=(n?c[t].slice(1):c[t]).padStart(e,`0`);c[t]=n?`-${r}`:r}}let p=c.join(t);return{stdout:p?`${p}
|
|
6
6
|
`:``,stderr:``,exitCode:0}}},t={name:`seq`,flags:[{flag:`-s`,type:`value`,valueHint:`string`},{flag:`-w`,type:`boolean`}],needsArgs:!0};export{t as n,e as t};
|
|
7
|
-
//# sourceMappingURL=chunk-A7A2DBEE-
|
|
7
|
+
//# sourceMappingURL=chunk-A7A2DBEE-dTNL-45u.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./chunk-74CEPOFO-
|
|
1
|
+
import{n as e,r as t,t as n}from"./chunk-74CEPOFO-BcZUJMO1.mjs";var r={name:`join`,summary:`join lines of two files on a common field`,usage:`join [OPTION]... FILE1 FILE2`,description:`For each pair of input lines with identical join fields, write a line to standard output. The default join field is the first, delimited by blanks.`,options:[`-1 FIELD Join on this FIELD of file 1 (default: 1)`,`-2 FIELD Join on this FIELD of file 2 (default: 1)`,`-t CHAR Use CHAR as input and output field separator`,`-a FILENUM Also print unpairable lines from file FILENUM (1 or 2)`,`-v FILENUM Like -a but only output unpairable lines`,`-e STRING Replace missing fields with STRING`,`-o FORMAT Output format (comma-separated list of FILENUM.FIELD)`,`-i Ignore case when comparing fields`],examples:[`join file1 file2 # Join on first field`,`join -1 2 -2 1 file1 file2 # Join file1 col 2 with file2 col 1`,`join -t ',' file1.csv file2.csv # Join CSV files`,`join -a 1 file1 file2 # Left outer join`]};function i(e,t){return t?e.split(t):e.split(/[ \t]+/).filter(e=>e.length>0)}function a(e,t,n,r){let a=i(e,t),o=a[n-1]??``;return r&&(o=o.toLowerCase()),{fields:a,joinKey:o,original:e}}function o(e,t,n){let r=n.separator??` `;if(n.outputFormat){let i=[];for(let{file:r,field:a}of n.outputFormat){let o=r===1?e:t;o&&a===0?i.push(o.joinKey):o&&o.fields[a-1]!==void 0?i.push(o.fields[a-1]):i.push(n.emptyString)}return i.join(r)}let i=[],a=e?.joinKey??t?.joinKey??``;if(i.push(a),e)for(let t=0;t<e.fields.length;t++)t!==n.field1-1&&i.push(e.fields[t]);if(t)for(let e=0;e<t.fields.length;e++)e!==n.field2-1&&i.push(t.fields[e]);return i.join(r)}function s(e){let t=e.split(`,`),n=[];for(let e of t){let t=e.trim().match(/^(\d+)\.(\d+)$/);if(!t)return null;let r=Number.parseInt(t[1],10),i=Number.parseInt(t[2],10);if(r!==1&&r!==2)return null;n.push({file:r,field:i})}return n}var c={name:`join`,execute:async(i,c)=>{if(n(i))return t(r);let l={field1:1,field2:1,separator:null,printUnpairable:new Set,onlyUnpairable:new Set,emptyString:``,outputFormat:null,ignoreCase:!1},u=[],d=0;for(;d<i.length;){let t=i[d];if(t===`-1`&&d+1<i.length){let e=Number.parseInt(i[d+1],10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:``,stderr:`join: invalid field number: '${i[d+1]}'
|
|
2
2
|
`};l.field1=e,d+=2}else if(t===`-2`&&d+1<i.length){let e=Number.parseInt(i[d+1],10);if(Number.isNaN(e)||e<1)return{exitCode:1,stdout:``,stderr:`join: invalid field number: '${i[d+1]}'
|
|
3
3
|
`};l.field2=e,d+=2}else if((t===`-t`||t===`--field-separator`)&&d+1<i.length)l.separator=i[d+1],d+=2;else if(t.startsWith(`-t`)&&t.length>2)l.separator=t.slice(2),d++;else if(t===`-a`&&d+1<i.length){let e=Number.parseInt(i[d+1],10);if(e!==1&&e!==2)return{exitCode:1,stdout:``,stderr:`join: invalid file number: '${i[d+1]}'
|
|
4
4
|
`};l.printUnpairable.add(e),d+=2}else if(t.match(/^-a[12]$/))l.printUnpairable.add(Number.parseInt(t[2],10)),d++;else if(t===`-v`&&d+1<i.length){let e=Number.parseInt(i[d+1],10);if(e!==1&&e!==2)return{exitCode:1,stdout:``,stderr:`join: invalid file number: '${i[d+1]}'
|
|
@@ -11,4 +11,4 @@ import{n as e,r as t,t as n}from"./chunk-74CEPOFO-D1bzz49u.mjs";var r={name:`joi
|
|
|
11
11
|
`)&&n[n.length-1]===``&&n.pop(),n.filter(e=>e.length>0).map(e=>a(e,l.separator,t,l.ignoreCase))},m=p(f[0],l.field1),h=p(f[1],l.field2),g=new Map;for(let e of h){let t=g.get(e.joinKey);t?t.push(e):g.set(e.joinKey,[e])}let _=[],v=new Set;for(let e of m){let t=g.get(e.joinKey);if(t&&t.length>0){if(v.add(e.joinKey),l.onlyUnpairable.size===0)for(let n of t)_.push(o(e,n,l))}else (l.printUnpairable.has(1)||l.onlyUnpairable.has(1))&&_.push(o(e,null,l))}if(l.printUnpairable.has(2)||l.onlyUnpairable.has(2))for(let e of h)v.has(e.joinKey)||_.push(o(null,e,l));return{exitCode:0,stdout:_.length>0?`${_.join(`
|
|
12
12
|
`)}
|
|
13
13
|
`:``,stderr:``}}},l={name:`join`,flags:[{flag:`-1`,type:`value`,valueHint:`number`},{flag:`-2`,type:`value`,valueHint:`number`},{flag:`-t`,type:`value`,valueHint:`delimiter`},{flag:`-a`,type:`value`,valueHint:`number`},{flag:`-v`,type:`value`,valueHint:`number`},{flag:`-e`,type:`value`,valueHint:`string`},{flag:`-o`,type:`value`,valueHint:`format`},{flag:`-i`,type:`boolean`}],needsArgs:!0,minArgs:2};export{c as n,l as t};
|
|
14
|
-
//# sourceMappingURL=chunk-A7ICOL4V-
|
|
14
|
+
//# sourceMappingURL=chunk-A7ICOL4V-BvXPAaHu.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{r as e,t}from"./chunk-74CEPOFO-
|
|
1
|
+
import{r as e,t}from"./chunk-74CEPOFO-BcZUJMO1.mjs";var n={name:`basename`,summary:`strip directory and suffix from filenames`,usage:`basename NAME [SUFFIX]
|
|
2
2
|
basename OPTION... NAME...`,options:[`-a, --multiple support multiple arguments`,`-s, --suffix=SUFFIX remove a trailing SUFFIX`,` --help display this help and exit`]},r={name:`basename`,async execute(r,i){if(t(r))return e(n);let a=!1,o=``,s=[];for(let e=0;e<r.length;e++){let t=r[e];t===`-a`||t===`--multiple`?a=!0:t===`-s`&&e+1<r.length?(o=r[++e],a=!0):t.startsWith(`--suffix=`)?(o=t.slice(9),a=!0):t.startsWith(`-`)||s.push(t)}if(s.length===0)return{stdout:``,stderr:`basename: missing operand
|
|
3
3
|
`,exitCode:1};!a&&s.length>=2&&(o=s.pop()??``);let c=[];for(let e of s){let t=e.replace(/\/+$/,``),n=t.split(`/`).pop()||t;o&&n.endsWith(o)&&(n=n.slice(0,-o.length)),c.push(n)}return{stdout:`${c.join(`
|
|
4
4
|
`)}
|
|
5
5
|
`,stderr:``,exitCode:0}}},i={name:`basename`,flags:[{flag:`-a`,type:`boolean`},{flag:`-s`,type:`value`,valueHint:`string`}],needsArgs:!0};export{i as n,r as t};
|
|
6
|
-
//# sourceMappingURL=chunk-ALLTKNUZ-
|
|
6
|
+
//# sourceMappingURL=chunk-ALLTKNUZ-Cu6JFoC4.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./chunk-EIZGF4BS-
|
|
2
|
-
//# sourceMappingURL=chunk-APT7OOP2-
|
|
1
|
+
import{t as e}from"./chunk-EIZGF4BS-DOoQW9jQ.mjs";var t=e(`md5sum`,`md5`,`compute MD5 message digest`),n={name:`md5sum`,flags:[{flag:`-c`,type:`boolean`}],needsFiles:!0};export{t as n,n as t};
|
|
2
|
+
//# sourceMappingURL=chunk-APT7OOP2-DmUrFuRy.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{t as e}from"./chunk-YNYSPYQ5-BpP11HXS.mjs";import{i as t}from"./chunk-GFQRA5P5-1fzItQ8F.mjs";import{r as n,t as r}from"./chunk-OJDRYQWQ-BV5MVRVg.mjs";import{t as i}from"./chunk-24IMIIXA-Bz7rlZT3.mjs";import{a,c as o,i as s,n as c,o as l,r as u,t as d}from"./chunk-7TSDKFEO-a-GUGBTu.mjs";function f(e,t,n,i,s,c,u,d,f,p){switch(t){case`sort`:return Array.isArray(e)?[[...e].sort(u)]:[null];case`sort_by`:return!Array.isArray(e)||n.length===0?[null]:[[...e].sort((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)})];case`bsearch`:if(!Array.isArray(e))throw Error(`${e===null?`null`:typeof e==`object`?`object`:typeof e} (${JSON.stringify(e)}) cannot be searched from`);return n.length===0?[null]:s(e,n[0],i).map(t=>{let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;u(e[i],t)<0?n=i+1:r=i}return n<e.length&&u(e[n],t)===0?n:-n-1});case`unique_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=s(r,n[0],i)[0],a=JSON.stringify(e);t.has(a)||t.set(a,{item:r,key:e})}let r=[...t.values()];return r.sort((e,t)=>u(e.key,t.key)),[r.map(e=>e.item)]}case`group_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=JSON.stringify(s(r,n[0],i)[0]);t.has(e)||t.set(e,[]),t.get(e)?.push(r)}return[[...t.values()]]}case`max`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)>0?e:t)]:[null];case`max_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)>0?e:t})];case`min`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)<0?e:t)]:[null];case`min_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)<0?e:t})];case`add`:{let t=e=>{let t=e.filter(e=>e!==null);return t.length===0?null:t.every(e=>typeof e==`number`)?t.reduce((e,t)=>e+t,0):t.every(e=>typeof e==`string`)?t.join(``):t.every(e=>Array.isArray(e))?t.flat():t.every(e=>e&&typeof e==`object`&&!Array.isArray(e))?r(...t):null};return n.length>=1?[t(s(e,n[0],i))]:Array.isArray(e)?[t(e)]:[null]}case`any`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(s(e,n[1],i).some(d))return[!0]}catch(e){if(e instanceof p)throw e}return[!1]}return n.length===1?Array.isArray(e)?[e.some(e=>d(s(e,n[0],i)[0]))]:[!1]:Array.isArray(e)?[e.some(d)]:[!1];case`all`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(!s(e,n[1],i).some(d))return[!1]}catch(e){if(e instanceof p)throw e}return[!0]}return n.length===1?Array.isArray(e)?[e.every(e=>d(s(e,n[0],i)[0]))]:[!0]:Array.isArray(e)?[e.every(d)]:[!0];case`select`:return n.length===0||s(e,n[0],i).some(d)?[e]:[];case`map`:return n.length===0||!Array.isArray(e)?[null]:[e.flatMap(e=>s(e,n[0],i))];case`map_values`:if(n.length===0)return[null];if(Array.isArray(e))return[e.flatMap(e=>s(e,n[0],i))];if(e&&typeof e==`object`){let t=Object.create(null);for(let[r,o]of Object.entries(e)){if(!l(r))continue;let e=s(o,n[0],i);e.length>0&&a(t,r,e[0])}return[t]}return[null];case`has`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(e)&&typeof t==`number`?[t>=0&&t<e.length]:e&&typeof e==`object`&&typeof t==`string`?[o(e,t)]:[!1]}case`in`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(t)&&typeof e==`number`?[e>=0&&e<t.length]:t&&typeof t==`object`&&typeof e==`string`?[o(t,e)]:[!1]}case`contains`:return n.length===0?[!1]:[f(e,s(e,n[0],i)[0])];case`inside`:return n.length===0?[!1]:[f(s(e,n[0],i)[0],e)];default:return null}}function p(e,t,n,r,i,a,o,s){switch(t){case`first`:if(n.length>0)try{let t=a(e,n[0],r);return t.length>0?[t[0]]:[]}catch(e){if(e instanceof s)throw e;return[]}return Array.isArray(e)&&e.length>0?[e[0]]:[null];case`last`:if(n.length>0){let t=i(e,n[0],r);return t.length>0?[t[t.length-1]]:[]}return Array.isArray(e)&&e.length>0?[e[e.length-1]]:[null];case`nth`:{if(n.length<1)return[null];let t=i(e,n[0],r);if(n.length>1){for(let e of t)if(e<0)throw Error(`nth doesn't support negative indices`);let i;try{i=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;i=[]}return t.flatMap(e=>{let t=e;return t<i.length?[i[t]]:[]})}return Array.isArray(e)?t.flatMap(t=>{let n=t;if(n<0)throw Error(`nth doesn't support negative indices`);return n<e.length?[e[n]]:[null]}):[null]}case`range`:{if(n.length===0)return[];let t=Math.max(r.limits.maxIterations*100,1e6),a=e=>e.length>=t,o=i(e,n[0],r);if(n.length===1){let e=[];for(let t of o){let n=t;for(let t=0;t<n;t++)if(e.push(t),a(e))return e}return e}let s=i(e,n[1],r);if(n.length===2){let e=[];for(let t of o)for(let n of s){let r=t,i=n;for(let t=r;t<i;t++)if(e.push(t),a(e))return e}return e}let c=i(e,n[2],r),l=[];for(let e of o)for(let t of s)for(let n of c){let r=e,i=t,o=n;if(o!==0){if(o>0){for(let e=r;e<i;e+=o)if(l.push(e),a(l))return l}else for(let e=r;e>i;e+=o)if(l.push(e),a(l))return l}}return l}case`limit`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let i=t;if(i<0)throw Error(`limit doesn't support negative count`);if(i===0)return[];let o;try{o=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;o=[]}return o.slice(0,i)});case`isempty`:if(n.length<1)return[!0];try{return[a(e,n[0],r).length===0]}catch(e){if(e instanceof s)throw e;return[!0]}case`isvalid`:if(n.length<1)return[!0];try{return[i(e,n[0],r).length>0]}catch(e){if(e instanceof s)throw e;return[!1]}case`skip`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let a=t;if(a<0)throw Error(`skip doesn't support negative count`);return i(e,n[1],r).slice(a)});case`until`:{if(n.length<2)return[e];let t=e,a=r.limits.maxIterations;for(let e=0;e<a;e++){if(i(t,n[0],r).some(o))return[t];let e=i(t,n[1],r);if(e.length===0)return[t];t=e[0]}throw new s(`jq until: too many iterations (${a}), increase executionLimits.maxJqIterations`,`iterations`)}case`while`:{if(n.length<2)return[e];let t=[],a=e,c=r.limits.maxIterations;for(let e=0;e<c&&i(a,n[0],r).some(o);e++){t.push(a);let e=i(a,n[1],r);if(e.length===0)break;a=e[0]}if(t.length>=c)throw new s(`jq while: too many iterations (${c}), increase executionLimits.maxJqIterations`,`iterations`);return t}case`repeat`:{if(n.length===0)return[e];let t=[],a=e,o=r.limits.maxIterations;for(let e=0;e<o;e++){t.push(a);let e=i(a,n[0],r);if(e.length===0)break;a=e[0]}if(t.length>=o)throw new s(`jq repeat: too many iterations (${o}), increase executionLimits.maxJqIterations`,`iterations`);return t}default:return null}}function m(e,t,n,r,i){switch(t){case`now`:return[Date.now()/1e3];case`gmtime`:{if(typeof e!=`number`)return[null];let t=new Date(e*1e3),n=t.getUTCFullYear(),r=t.getUTCMonth(),i=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),s=t.getUTCSeconds(),c=t.getUTCDay(),l=Date.UTC(n,0,1);return[[n,r,i,a,o,s,c,Math.floor((t.getTime()-l)/(1440*60*1e3))]]}case`mktime`:{if(!Array.isArray(e))throw Error(`mktime requires parsed datetime inputs`);let[t,n,r,i=0,a=0,o=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`mktime requires parsed datetime inputs`);return[Math.floor(Date.UTC(t,n,r??1,i??0,a??0,o??0)/1e3)]}case`strftime`:{if(n.length===0)return[null];let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strftime/1 requires a string format`);let a;if(typeof e==`number`)a=new Date(e*1e3);else if(Array.isArray(e)){let[t,n,r,i=0,o=0,s=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`strftime/1 requires parsed datetime inputs`);a=new Date(Date.UTC(t,n,r??1,i??0,o??0,s??0))}else throw Error(`strftime/1 requires parsed datetime inputs`);let o=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],s=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],c=(e,t=2)=>String(e).padStart(t,`0`);return[t.replace(/%Y/g,String(a.getUTCFullYear())).replace(/%m/g,c(a.getUTCMonth()+1)).replace(/%d/g,c(a.getUTCDate())).replace(/%H/g,c(a.getUTCHours())).replace(/%M/g,c(a.getUTCMinutes())).replace(/%S/g,c(a.getUTCSeconds())).replace(/%A/g,o[a.getUTCDay()]).replace(/%B/g,s[a.getUTCMonth()]).replace(/%Z/g,`UTC`).replace(/%%/g,`%`)]}case`strptime`:{if(n.length===0)return[null];if(typeof e!=`string`)throw Error(`strptime/1 requires a string input`);let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strptime/1 requires a string format`);if(t===`%Y-%m-%dT%H:%M:%SZ`){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(t){let[,e,n,r,i,a,o]=t.map(Number),s=new Date(Date.UTC(e,n-1,r,i,a,o)),c=s.getUTCDay(),l=Date.UTC(e,0,1),u=Math.floor((s.getTime()-l)/(1440*60*1e3));return[[e,n-1,r,i,a,o,c,u]]}}let a=new Date(e);if(!Number.isNaN(a.getTime())){let e=a.getUTCFullYear(),t=a.getUTCMonth(),n=a.getUTCDate(),r=a.getUTCHours(),i=a.getUTCMinutes(),o=a.getUTCSeconds(),s=a.getUTCDay(),c=Date.UTC(e,0,1);return[[e,t,n,r,i,o,s,Math.floor((a.getTime()-c)/(1440*60*1e3))]]}throw Error(`Cannot parse date: ${e}`)}case`fromdate`:{if(typeof e!=`string`)throw Error(`fromdate requires a string input`);let t=new Date(e);if(Number.isNaN(t.getTime()))throw Error(`date "${e}" does not match format "%Y-%m-%dT%H:%M:%SZ"`);return[Math.floor(t.getTime()/1e3)]}case`todate`:if(typeof e!=`number`)throw Error(`todate requires a number input`);return[new Date(e*1e3).toISOString().replace(/\.\d{3}Z$/,`Z`)];default:return null}}function h(e){return e!==!1&&e!==null}function g(e,t){return JSON.stringify(e)===JSON.stringify(t)}function _(e,t){return typeof e==`number`&&typeof t==`number`?e-t:typeof e==`string`&&typeof t==`string`?e.localeCompare(t):0}function v(e,t){let n=c(e);for(let e of Object.keys(t)){if(!l(e))continue;let r=o(n,e)?u(n[e]):null,i=u(t[e]);r&&i?a(n,e,v(r,i)):a(n,e,t[e])}return n}function y(e,t=3e3){let n=0,r=e;for(;n<t;)if(Array.isArray(r)){if(r.length===0)return n+1;r=r[0],n++}else if(typeof r==`object`&&r){let e=Object.keys(r);if(e.length===0)return n+1;r=r[e[0]],n++}else return n;return n}function b(e,t){let n=e=>e===null?0:typeof e==`boolean`?1:typeof e==`number`?2:typeof e==`string`?3:Array.isArray(e)?4:typeof e==`object`?5:6,r=n(e),i=n(t);if(r!==i)return r-i;if(typeof e==`number`&&typeof t==`number`)return e-t;if(typeof e==`string`&&typeof t==`string`)return e.localeCompare(t);if(typeof e==`boolean`&&typeof t==`boolean`)return(e?1:0)-(t?1:0);if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<Math.min(e.length,t.length);n++){let r=b(e[n],t[n]);if(r!==0)return r}return e.length-t.length}let a=u(e),o=u(t);if(a&&o){let e=Object.keys(a).sort(),t=Object.keys(o).sort();for(let n=0;n<Math.min(e.length,t.length);n++){let r=e[n].localeCompare(t[n]);if(r!==0)return r}if(e.length!==t.length)return e.length-t.length;for(let t of e){let e=b(a[t],o[t]);if(e!==0)return e}}return 0}function x(e,t){if(g(e,t))return!0;if(typeof e==`string`&&typeof t==`string`)return e.includes(t);if(Array.isArray(e)&&Array.isArray(t))return t.every(t=>e.some(e=>x(e,t)));let n=u(e),r=u(t);return n&&r?Object.keys(r).every(e=>o(n,e)&&x(n[e],r[e])):!1}var S=2e3;function C(e,t,n){switch(t){case`@base64`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`utf-8`).toString(`base64`)]:[btoa(e)]:[null];case`@base64d`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`base64`).toString(`utf-8`)]:[atob(e)]:[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(e=>{if(e===null)return``;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return String(e);let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(`
|
|
1
|
+
import{t as e}from"./chunk-YNYSPYQ5-DesxOVHh.mjs";import{i as t}from"./chunk-GFQRA5P5-DnjwTqP3.mjs";import{r as n,t as r}from"./chunk-OJDRYQWQ-ikvLWpfV.mjs";import{t as i}from"./chunk-24IMIIXA-B6yIPkk2.mjs";import{a,c as o,i as s,n as c,o as l,r as u,t as d}from"./chunk-7TSDKFEO-DUQhJkDy.mjs";function f(e,t,n,i,s,c,u,d,f,p){switch(t){case`sort`:return Array.isArray(e)?[[...e].sort(u)]:[null];case`sort_by`:return!Array.isArray(e)||n.length===0?[null]:[[...e].sort((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)})];case`bsearch`:if(!Array.isArray(e))throw Error(`${e===null?`null`:typeof e==`object`?`object`:typeof e} (${JSON.stringify(e)}) cannot be searched from`);return n.length===0?[null]:s(e,n[0],i).map(t=>{let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;u(e[i],t)<0?n=i+1:r=i}return n<e.length&&u(e[n],t)===0?n:-n-1});case`unique_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=s(r,n[0],i)[0],a=JSON.stringify(e);t.has(a)||t.set(a,{item:r,key:e})}let r=[...t.values()];return r.sort((e,t)=>u(e.key,t.key)),[r.map(e=>e.item)]}case`group_by`:{if(!Array.isArray(e)||n.length===0)return[null];let t=new Map;for(let r of e){let e=JSON.stringify(s(r,n[0],i)[0]);t.has(e)||t.set(e,[]),t.get(e)?.push(r)}return[[...t.values()]]}case`max`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)>0?e:t)]:[null];case`max_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)>0?e:t})];case`min`:return Array.isArray(e)&&e.length>0?[e.reduce((e,t)=>u(e,t)<0?e:t)]:[null];case`min_by`:return!Array.isArray(e)||e.length===0||n.length===0?[null]:[e.reduce((e,t)=>{let r=s(e,n[0],i)[0],a=s(t,n[0],i)[0];return u(r,a)<0?e:t})];case`add`:{let t=e=>{let t=e.filter(e=>e!==null);return t.length===0?null:t.every(e=>typeof e==`number`)?t.reduce((e,t)=>e+t,0):t.every(e=>typeof e==`string`)?t.join(``):t.every(e=>Array.isArray(e))?t.flat():t.every(e=>e&&typeof e==`object`&&!Array.isArray(e))?r(...t):null};return n.length>=1?[t(s(e,n[0],i))]:Array.isArray(e)?[t(e)]:[null]}case`any`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(s(e,n[1],i).some(d))return[!0]}catch(e){if(e instanceof p)throw e}return[!1]}return n.length===1?Array.isArray(e)?[e.some(e=>d(s(e,n[0],i)[0]))]:[!1]:Array.isArray(e)?[e.some(d)]:[!1];case`all`:if(n.length>=2){try{let t=c(e,n[0],i);for(let e of t)if(!s(e,n[1],i).some(d))return[!1]}catch(e){if(e instanceof p)throw e}return[!0]}return n.length===1?Array.isArray(e)?[e.every(e=>d(s(e,n[0],i)[0]))]:[!0]:Array.isArray(e)?[e.every(d)]:[!0];case`select`:return n.length===0||s(e,n[0],i).some(d)?[e]:[];case`map`:return n.length===0||!Array.isArray(e)?[null]:[e.flatMap(e=>s(e,n[0],i))];case`map_values`:if(n.length===0)return[null];if(Array.isArray(e))return[e.flatMap(e=>s(e,n[0],i))];if(e&&typeof e==`object`){let t=Object.create(null);for(let[r,o]of Object.entries(e)){if(!l(r))continue;let e=s(o,n[0],i);e.length>0&&a(t,r,e[0])}return[t]}return[null];case`has`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(e)&&typeof t==`number`?[t>=0&&t<e.length]:e&&typeof e==`object`&&typeof t==`string`?[o(e,t)]:[!1]}case`in`:{if(n.length===0)return[!1];let t=s(e,n[0],i)[0];return Array.isArray(t)&&typeof e==`number`?[e>=0&&e<t.length]:t&&typeof t==`object`&&typeof e==`string`?[o(t,e)]:[!1]}case`contains`:return n.length===0?[!1]:[f(e,s(e,n[0],i)[0])];case`inside`:return n.length===0?[!1]:[f(s(e,n[0],i)[0],e)];default:return null}}function p(e,t,n,r,i,a,o,s){switch(t){case`first`:if(n.length>0)try{let t=a(e,n[0],r);return t.length>0?[t[0]]:[]}catch(e){if(e instanceof s)throw e;return[]}return Array.isArray(e)&&e.length>0?[e[0]]:[null];case`last`:if(n.length>0){let t=i(e,n[0],r);return t.length>0?[t[t.length-1]]:[]}return Array.isArray(e)&&e.length>0?[e[e.length-1]]:[null];case`nth`:{if(n.length<1)return[null];let t=i(e,n[0],r);if(n.length>1){for(let e of t)if(e<0)throw Error(`nth doesn't support negative indices`);let i;try{i=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;i=[]}return t.flatMap(e=>{let t=e;return t<i.length?[i[t]]:[]})}return Array.isArray(e)?t.flatMap(t=>{let n=t;if(n<0)throw Error(`nth doesn't support negative indices`);return n<e.length?[e[n]]:[null]}):[null]}case`range`:{if(n.length===0)return[];let t=Math.max(r.limits.maxIterations*100,1e6),a=e=>e.length>=t,o=i(e,n[0],r);if(n.length===1){let e=[];for(let t of o){let n=t;for(let t=0;t<n;t++)if(e.push(t),a(e))return e}return e}let s=i(e,n[1],r);if(n.length===2){let e=[];for(let t of o)for(let n of s){let r=t,i=n;for(let t=r;t<i;t++)if(e.push(t),a(e))return e}return e}let c=i(e,n[2],r),l=[];for(let e of o)for(let t of s)for(let n of c){let r=e,i=t,o=n;if(o!==0){if(o>0){for(let e=r;e<i;e+=o)if(l.push(e),a(l))return l}else for(let e=r;e>i;e+=o)if(l.push(e),a(l))return l}}return l}case`limit`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let i=t;if(i<0)throw Error(`limit doesn't support negative count`);if(i===0)return[];let o;try{o=a(e,n[1],r)}catch(e){if(e instanceof s)throw e;o=[]}return o.slice(0,i)});case`isempty`:if(n.length<1)return[!0];try{return[a(e,n[0],r).length===0]}catch(e){if(e instanceof s)throw e;return[!0]}case`isvalid`:if(n.length<1)return[!0];try{return[i(e,n[0],r).length>0]}catch(e){if(e instanceof s)throw e;return[!1]}case`skip`:return n.length<2?[]:i(e,n[0],r).flatMap(t=>{let a=t;if(a<0)throw Error(`skip doesn't support negative count`);return i(e,n[1],r).slice(a)});case`until`:{if(n.length<2)return[e];let t=e,a=r.limits.maxIterations;for(let e=0;e<a;e++){if(i(t,n[0],r).some(o))return[t];let e=i(t,n[1],r);if(e.length===0)return[t];t=e[0]}throw new s(`jq until: too many iterations (${a}), increase executionLimits.maxJqIterations`,`iterations`)}case`while`:{if(n.length<2)return[e];let t=[],a=e,c=r.limits.maxIterations;for(let e=0;e<c&&i(a,n[0],r).some(o);e++){t.push(a);let e=i(a,n[1],r);if(e.length===0)break;a=e[0]}if(t.length>=c)throw new s(`jq while: too many iterations (${c}), increase executionLimits.maxJqIterations`,`iterations`);return t}case`repeat`:{if(n.length===0)return[e];let t=[],a=e,o=r.limits.maxIterations;for(let e=0;e<o;e++){t.push(a);let e=i(a,n[0],r);if(e.length===0)break;a=e[0]}if(t.length>=o)throw new s(`jq repeat: too many iterations (${o}), increase executionLimits.maxJqIterations`,`iterations`);return t}default:return null}}function m(e,t,n,r,i){switch(t){case`now`:return[Date.now()/1e3];case`gmtime`:{if(typeof e!=`number`)return[null];let t=new Date(e*1e3),n=t.getUTCFullYear(),r=t.getUTCMonth(),i=t.getUTCDate(),a=t.getUTCHours(),o=t.getUTCMinutes(),s=t.getUTCSeconds(),c=t.getUTCDay(),l=Date.UTC(n,0,1);return[[n,r,i,a,o,s,c,Math.floor((t.getTime()-l)/(1440*60*1e3))]]}case`mktime`:{if(!Array.isArray(e))throw Error(`mktime requires parsed datetime inputs`);let[t,n,r,i=0,a=0,o=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`mktime requires parsed datetime inputs`);return[Math.floor(Date.UTC(t,n,r??1,i??0,a??0,o??0)/1e3)]}case`strftime`:{if(n.length===0)return[null];let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strftime/1 requires a string format`);let a;if(typeof e==`number`)a=new Date(e*1e3);else if(Array.isArray(e)){let[t,n,r,i=0,o=0,s=0]=e;if(typeof t!=`number`||typeof n!=`number`)throw Error(`strftime/1 requires parsed datetime inputs`);a=new Date(Date.UTC(t,n,r??1,i??0,o??0,s??0))}else throw Error(`strftime/1 requires parsed datetime inputs`);let o=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],s=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],c=(e,t=2)=>String(e).padStart(t,`0`);return[t.replace(/%Y/g,String(a.getUTCFullYear())).replace(/%m/g,c(a.getUTCMonth()+1)).replace(/%d/g,c(a.getUTCDate())).replace(/%H/g,c(a.getUTCHours())).replace(/%M/g,c(a.getUTCMinutes())).replace(/%S/g,c(a.getUTCSeconds())).replace(/%A/g,o[a.getUTCDay()]).replace(/%B/g,s[a.getUTCMonth()]).replace(/%Z/g,`UTC`).replace(/%%/g,`%`)]}case`strptime`:{if(n.length===0)return[null];if(typeof e!=`string`)throw Error(`strptime/1 requires a string input`);let t=i(e,n[0],r)[0];if(typeof t!=`string`)throw Error(`strptime/1 requires a string format`);if(t===`%Y-%m-%dT%H:%M:%SZ`){let t=e.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/);if(t){let[,e,n,r,i,a,o]=t.map(Number),s=new Date(Date.UTC(e,n-1,r,i,a,o)),c=s.getUTCDay(),l=Date.UTC(e,0,1),u=Math.floor((s.getTime()-l)/(1440*60*1e3));return[[e,n-1,r,i,a,o,c,u]]}}let a=new Date(e);if(!Number.isNaN(a.getTime())){let e=a.getUTCFullYear(),t=a.getUTCMonth(),n=a.getUTCDate(),r=a.getUTCHours(),i=a.getUTCMinutes(),o=a.getUTCSeconds(),s=a.getUTCDay(),c=Date.UTC(e,0,1);return[[e,t,n,r,i,o,s,Math.floor((a.getTime()-c)/(1440*60*1e3))]]}throw Error(`Cannot parse date: ${e}`)}case`fromdate`:{if(typeof e!=`string`)throw Error(`fromdate requires a string input`);let t=new Date(e);if(Number.isNaN(t.getTime()))throw Error(`date "${e}" does not match format "%Y-%m-%dT%H:%M:%SZ"`);return[Math.floor(t.getTime()/1e3)]}case`todate`:if(typeof e!=`number`)throw Error(`todate requires a number input`);return[new Date(e*1e3).toISOString().replace(/\.\d{3}Z$/,`Z`)];default:return null}}function h(e){return e!==!1&&e!==null}function g(e,t){return JSON.stringify(e)===JSON.stringify(t)}function _(e,t){return typeof e==`number`&&typeof t==`number`?e-t:typeof e==`string`&&typeof t==`string`?e.localeCompare(t):0}function v(e,t){let n=c(e);for(let e of Object.keys(t)){if(!l(e))continue;let r=o(n,e)?u(n[e]):null,i=u(t[e]);r&&i?a(n,e,v(r,i)):a(n,e,t[e])}return n}function y(e,t=3e3){let n=0,r=e;for(;n<t;)if(Array.isArray(r)){if(r.length===0)return n+1;r=r[0],n++}else if(typeof r==`object`&&r){let e=Object.keys(r);if(e.length===0)return n+1;r=r[e[0]],n++}else return n;return n}function b(e,t){let n=e=>e===null?0:typeof e==`boolean`?1:typeof e==`number`?2:typeof e==`string`?3:Array.isArray(e)?4:typeof e==`object`?5:6,r=n(e),i=n(t);if(r!==i)return r-i;if(typeof e==`number`&&typeof t==`number`)return e-t;if(typeof e==`string`&&typeof t==`string`)return e.localeCompare(t);if(typeof e==`boolean`&&typeof t==`boolean`)return(e?1:0)-(t?1:0);if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<Math.min(e.length,t.length);n++){let r=b(e[n],t[n]);if(r!==0)return r}return e.length-t.length}let a=u(e),o=u(t);if(a&&o){let e=Object.keys(a).sort(),t=Object.keys(o).sort();for(let n=0;n<Math.min(e.length,t.length);n++){let r=e[n].localeCompare(t[n]);if(r!==0)return r}if(e.length!==t.length)return e.length-t.length;for(let t of e){let e=b(a[t],o[t]);if(e!==0)return e}}return 0}function x(e,t){if(g(e,t))return!0;if(typeof e==`string`&&typeof t==`string`)return e.includes(t);if(Array.isArray(e)&&Array.isArray(t))return t.every(t=>e.some(e=>x(e,t)));let n=u(e),r=u(t);return n&&r?Object.keys(r).every(e=>o(n,e)&&x(n[e],r[e])):!1}var S=2e3;function C(e,t,n){switch(t){case`@base64`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`utf-8`).toString(`base64`)]:[btoa(e)]:[null];case`@base64d`:return typeof e==`string`?typeof Buffer<`u`?[Buffer.from(e,`base64`).toString(`utf-8`)]:[atob(e)]:[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(e=>{if(e===null)return``;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return String(e);let t=String(e);return t.includes(`,`)||t.includes(`"`)||t.includes(`
|
|
2
2
|
`)||t.includes(`\r`)?`"${t.replace(/"/g,`""`)}"`:t}).join(`,`)]:[null];case`@tsv`:return Array.isArray(e)?[e.map(e=>String(e??``).replace(/\t/g,`\\t`).replace(/\n/g,`\\n`)).join(` `)]:[null];case`@json`:{let t=n??S;return y(e,t+1)>t?[null]:[JSON.stringify(e)]}case`@html`:return typeof e==`string`?[e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/'/g,`'`).replace(/"/g,`"`)]:[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 w(e,t,n,r,i,a){switch(t){case`index`:return n.length===0?[null]:i(e,n[0],r).map(t=>{if(typeof e==`string`&&typeof t==`string`){if(t===``&&e===``)return null;let n=e.indexOf(t);return n>=0?n:null}if(Array.isArray(e)){if(Array.isArray(t)){for(let n=0;n<=e.length-t.length;n++){let r=!0;for(let i=0;i<t.length;i++)if(!a(e[n+i],t[i])){r=!1;break}if(r)return n}return null}let n=e.findIndex(e=>a(e,t));return n>=0?n:null}return null});case`rindex`:return n.length===0?[null]:i(e,n[0],r).map(t=>{if(typeof e==`string`&&typeof t==`string`){let n=e.lastIndexOf(t);return n>=0?n:null}if(Array.isArray(e)){if(Array.isArray(t)){for(let n=e.length-t.length;n>=0;n--){let r=!0;for(let i=0;i<t.length;i++)if(!a(e[n+i],t[i])){r=!1;break}if(r)return n}return null}for(let n=e.length-1;n>=0;n--)if(a(e[n],t))return n;return null}return null});case`indices`:return n.length===0?[[]]:i(e,n[0],r).map(t=>{let n=[];if(typeof e==`string`&&typeof t==`string`){let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1)}else if(Array.isArray(e))if(Array.isArray(t)){let r=t.length;if(r===0)for(let t=0;t<=e.length;t++)n.push(t);else for(let i=0;i<=e.length-r;i++){let o=!0;for(let n=0;n<r;n++)if(!a(e[i+n],t[n])){o=!1;break}o&&n.push(i)}}else for(let r=0;r<e.length;r++)a(e[r],t)&&n.push(r);return n});default:return null}}function T(e,t,n,r,i){switch(t){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(n.length<2)return[null];let t=i(e,n[0],r),a=i(e,n[1],r),o=t[0],s=a[0];return typeof o!=`number`||typeof s!=`number`?[null]:[o**s]}case`atan2`:{if(n.length<2)return[null];let t=i(e,n[0],r),a=i(e,n[1],r),o=t[0],s=a[0];return typeof o!=`number`||typeof s!=`number`?[null]:[Math.atan2(o,s)]}case`hypot`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.hypot(e,t)]}case`fma`:{if(typeof e!=`number`||n.length<2)return[null];let t=i(e,n[0],r)[0],a=i(e,n[1],r)[0];return[e*t+a]}case`copysign`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.sign(t)*Math.abs(e)]}case`drem`:case`remainder`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[e-Math.round(e/t)*t]}case`fdim`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.max(0,e-t)]}case`fmax`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.max(e,t)]}case`fmin`:{if(typeof e!=`number`||n.length===0)return[null];let t=i(e,n[0],r)[0];return[Math.min(e,t)]}case`ldexp`:return typeof e!=`number`||n.length===0?[null]:[e*2**i(e,n[0],r)[0]];case`scalbn`:case`scalbln`:return typeof e!=`number`||n.length===0?[null]:[e*2**i(e,n[0],r)[0]];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`:return typeof e==`number`?[e/2**Math.floor(Math.log2(Math.abs(e)))]:[null];case`frexp`:if(typeof e==`number`){if(e===0)return[[0,0]];let t=Math.floor(Math.log2(Math.abs(e)))+1;return[[e/2**t,t]]}return[null];case`modf`:if(typeof e==`number`){let t=Math.trunc(e);return[[e-t,t]]}return[null];default:return null}}function E(e,t,n,r,i,o,s,c){switch(t){case`recurse`:{if(n.length===0){let t=[],n=e=>{if(t.push(e),Array.isArray(e))for(let t of e)n(t);else if(e&&typeof e==`object`)for(let t of Object.keys(e))n(e[t])};return n(e),t}let t=[],a=n.length>=2?n[1]:null,s=0,c=e=>{if(s++>1e4||a&&!i(e,a,r).some(o))return;t.push(e);let l=i(e,n[0],r);for(let e of l)e!=null&&c(e)};return c(e),t}case`recurse_down`:return c(e,`recurse`,n,r);case`walk`:{if(n.length===0)return[e];let t=new WeakSet,o=e=>{if(e&&typeof e==`object`){if(t.has(e))return e;t.add(e)}let s;if(Array.isArray(e))s=e.map(o);else if(e&&typeof e==`object`){let t=Object.create(null);for(let[n,r]of Object.entries(e))l(n)&&a(t,n,o(r));s=t}else s=e;return i(s,n[0],r)[0]};return[o(e)]}case`transpose`:{if(!Array.isArray(e))return[null];if(e.length===0)return[[]];let t=Math.max(...e.map(e=>Array.isArray(e)?e.length:0)),n=[];for(let r=0;r<t;r++)n.push(e.map(e=>Array.isArray(e)?e[r]:null));return[n]}case`combinations`:{if(n.length>0){let t=i(e,n[0],r)[0];if(!Array.isArray(e)||t<0)return[];if(t===0)return[[]];let a=[],o=(n,r)=>{if(r===t){a.push([...n]);return}for(let t of e)n.push(t),o(n,r+1),n.pop()};return o([],0),a}if(!Array.isArray(e))return[];if(e.length===0)return[[]];for(let t of e)if(!Array.isArray(t))return[];let t=[],a=(n,r)=>{if(n===e.length){t.push([...r]);return}let i=e[n];for(let e of i)r.push(e),a(n+1,r),r.pop()};return a(0,[]),t}case`parent`:{if(r.root===void 0||r.currentPath===void 0)return[];let t=r.currentPath;if(t.length===0)return[];let a=n.length>0?i(e,n[0],r)[0]:1;if(a>=0){if(a>t.length)return[];let e=t.slice(0,t.length-a);return[s(r.root,e)]}else{let n=-a-1;if(n>=t.length)return[e];let i=t.slice(0,n);return[s(r.root,i)]}}case`parents`:{if(r.root===void 0||r.currentPath===void 0)return[[]];let e=r.currentPath,t=[];for(let n=e.length-1;n>=0;n--)t.push(s(r.root,e.slice(0,n)));return[t]}case`root`:return r.root===void 0?[]:[r.root];default:return null}}var D=2e3;function O(e,t,n,r,i){switch(t){case`keys`:return Array.isArray(e)?[e.map((e,t)=>t)]:e&&typeof e==`object`?[Object.keys(e).sort()]:[null];case`keys_unsorted`:return Array.isArray(e)?[e.map((e,t)=>t)]:e&&typeof e==`object`?[Object.keys(e)]:[null];case`length`:return typeof e==`string`||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[new TextEncoder().encode(e).length];let t=e===null?`null`:Array.isArray(e)?`array`:typeof e,n=t===`array`||t===`object`?JSON.stringify(e):String(e);throw Error(`${t} (${n}) only strings have UTF-8 byte length`)}case`to_entries`:{let t=u(e);return t?[Object.entries(t).map(([e,t])=>({key:e,value:t}))]:[null]}case`from_entries`:if(Array.isArray(e)){let t=Object.create(null);for(let n of e){let e=u(n);if(e){let n=e.key??e.Key??e.name??e.Name??e.k,r=e.value??e.Value??e.v;if(n!==void 0){let e=String(n);l(e)&&a(t,e,r)}}}return[t]}return[null];case`with_entries`:{if(n.length===0)return[e];let t=u(e);if(t){let e=Object.entries(t).map(([e,t])=>({key:e,value:t})).flatMap(e=>i(e,n[0],r)),o=Object.create(null);for(let t of e){let e=u(t);if(e){let t=e.key??e.name??e.k,n=e.value??e.v;if(t!==void 0){let e=String(t);l(e)&&a(o,e,n)}}}return[o]}return[null]}case`reverse`:return Array.isArray(e)?[[...e].reverse()]:typeof e==`string`?[e.split(``).reverse().join(``)]:[null];case`flatten`:return Array.isArray(e)?(n.length>0?i(e,n[0],r):[1/0]).map(t=>{let n=t;if(n<0)throw Error(`flatten depth must not be negative`);return e.flat(n)}):[null];case`unique`:if(Array.isArray(e)){let t=new Set,n=[];for(let r of e){let e=JSON.stringify(r);t.has(e)||(t.add(e),n.push(r))}return[n]}return[null];case`tojson`:case`tojsonstream`:{let t=r.limits.maxDepth??D;return y(e,t+1)>t?[null]:[JSON.stringify(e)]}case`fromjson`:if(typeof e==`string`){let t=e.trim().toLowerCase();if(t===`nan`)return[NaN];if(t===`inf`||t===`infinity`)return[1/0];if(t===`-inf`||t===`-infinity`)return[-1/0];try{return[d(JSON.parse(e))]}catch{throw 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 t=Number(e);if(Number.isNaN(t))throw Error(`${JSON.stringify(e)} cannot be parsed as a number`);return[t]}throw 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 Error(`string (${JSON.stringify(e)}) cannot be parsed as a boolean`)}let t=e===null?`null`:Array.isArray(e)?`array`:typeof e,n=t===`array`||t===`object`?JSON.stringify(e):String(e);throw Error(`${t} (${n}) cannot be parsed as a boolean`)}case`tostream`:{let t=[],n=(e,r)=>{if(typeof e!=`object`||!e)t.push([r,e]);else if(Array.isArray(e))if(e.length===0)t.push([r,[]]);else for(let t=0;t<e.length;t++)n(e[t],[...r,t]);else{let i=Object.keys(e);if(i.length===0)t.push([r,Object.create(null)]);else for(let t of i)n(e[t],[...r,t])}};return n(e,[]),t.push([[]]),t}case`fromstream`:{if(n.length===0)return[e];let t=i(e,n[0],r),o=null;for(let e of t){if(!Array.isArray(e)||e.length===1&&Array.isArray(e[0])&&e[0].length===0||e.length!==2)continue;let[t,n]=e;if(!Array.isArray(t))continue;if(t.length===0){o=n;continue}o===null&&(o=typeof t[0]==`number`?[]:Object.create(null));let r=o;for(let e=0;e<t.length-1;e++){let n=t[e],i=t[e+1];if(Array.isArray(r)&&typeof n==`number`){for(;r.length<=n;)r.push(null);r[n]===null&&(r[n]=typeof i==`number`?[]:Object.create(null)),r=r[n]}else{let e=u(r);if(e){let t=String(n);if(!l(t))continue;(e[t]===null||e[t]===void 0)&&a(e,t,typeof i==`number`?[]:Object.create(null)),r=e[t]}}}let i=t[t.length-1];if(Array.isArray(r)&&typeof i==`number`){for(;r.length<=i;)r.push(null);r[i]=n}else{let e=u(r);if(e){let t=String(i);l(t)&&a(e,t,n)}}}return[o]}case`truncate_stream`:{let t=typeof e==`number`?Math.floor(e):0;if(n.length===0)return[];let a=[],o=i(e,n[0],r);for(let e of o)if(Array.isArray(e)){if(e.length===1&&Array.isArray(e[0])){let n=e[0];n.length>t&&a.push([n.slice(t)]);continue}if(e.length===2&&Array.isArray(e[0])){let n=e[0],r=e[1];n.length>t&&a.push([n.slice(t),r])}}return a}default:return null}}function ee(e,t,n,r,i,a,o,s,c,l){switch(t){case`getpath`:{if(n.length===0)return[null];let t=i(e,n[0],r),a=[];for(let n of t){let t=n,r=e;for(let e of t){if(r==null){r=null;break}if(Array.isArray(r)&&typeof e==`number`)r=r[e];else if(typeof e==`string`){let t=u(r);if(!t||!Object.hasOwn(t,e)){r=null;break}r=t[e]}else{r=null;break}}a.push(r)}return a}case`setpath`:{if(n.length<2)return[null];let t=i(e,n[0],r)[0],a=i(e,n[1],r)[0];return[o(e,t,a)]}case`delpaths`:{if(n.length===0)return[e];let t=i(e,n[0],r)[0],a=e;for(let e of t.sort((e,t)=>t.length-e.length))a=s(a,e);return[a]}case`path`:{if(n.length===0)return[[]];let t=[];return l(e,n[0],r,[],t),t}case`del`:return n.length===0?[e]:[c(e,n[0],r)];case`pick`:{if(n.length===0)return[null];let t=[];for(let i of n)l(e,i,r,[],t);let i=null;for(let n of t){for(let e of n)if(typeof e==`number`&&e<0)throw Error(`Out of bounds negative array index`);let t=e;for(let e of n){if(t==null)break;if(Array.isArray(t)&&typeof e==`number`)t=t[e];else if(typeof e==`string`){let n=u(t);if(!n||!Object.hasOwn(n,e)){t=null;break}t=n[e]}else{t=null;break}}i=o(i,n,t)}return[i]}case`paths`:{let t=[],o=(e,n)=>{if(e&&typeof e==`object`)if(Array.isArray(e))for(let r=0;r<e.length;r++)t.push([...n,r]),o(e[r],[...n,r]);else for(let r of Object.keys(e))t.push([...n,r]),o(e[r],[...n,r])};return o(e,[]),n.length>0?t.filter(t=>{let o=e;for(let e of t)if(Array.isArray(o)&&typeof e==`number`)o=o[e];else if(typeof e==`string`){let t=u(o);if(!t||!Object.hasOwn(t,e))return!1;o=t[e]}else return!1;return i(o,n[0],r).some(a)}):t}case`leaf_paths`:{let t=[],n=(e,r)=>{if(typeof e!=`object`||!e)t.push(r);else if(Array.isArray(e))for(let t=0;t<e.length;t++)n(e[t],[...r,t]);else for(let t of Object.keys(e))n(e[t],[...r,t])};return n(e,[]),t}default:return null}}function k(e,t,n,r,i,s){switch(t){case`IN`:{if(n.length===0)return[!1];if(n.length===1){let t=i(e,n[0],r);for(let n of t)if(s(e,n))return[!0];return[!1]}let t=i(e,n[0],r),a=i(e,n[1],r),o=new Set(a.map(e=>JSON.stringify(e)));for(let e of t)if(o.has(JSON.stringify(e)))return[!0];return[!1]}case`INDEX`:{if(n.length===0)return[Object.create(null)];if(n.length===1){let t=i(e,n[0],r),o=Object.create(null);for(let e of t){let t=String(e);l(t)&&a(o,t,e)}return[o]}if(n.length===2){let t=i(e,n[0],r),o=Object.create(null);for(let e of t){let t=i(e,n[1],r);if(t.length>0){let n=String(t[0]);l(n)&&a(o,n,e)}}return[o]}let t=i(e,n[0],r),o=Object.create(null);for(let e of t){let t=i(e,n[1],r),s=i(e,n[2],r);if(t.length>0&&s.length>0){let e=String(t[0]);l(e)&&a(o,e,s[0])}}return[o]}case`JOIN`:{if(n.length<2)return[null];let t=u(i(e,n[0],r)[0]);if(!t||!Array.isArray(e))return[null];let a=[];for(let s of e){let e=i(s,n[1],r),c=e.length>0?String(e[0]):``,l=o(t,c)?t[c]:null;a.push([s,l])}return[a]}default:return null}}function A(t,n,r,i,a){switch(n){case`join`:{if(!Array.isArray(t))return[null];let e=r.length>0?a(t,r[0],i):[``];for(let e of t)if(Array.isArray(e)||typeof e==`object`&&e)throw Error(`cannot join: contains arrays or objects`);return e.map(e=>t.map(e=>e===null?``:typeof e==`string`?e:String(e)).join(String(e)))}case`split`:{if(typeof t!=`string`||r.length===0)return[null];let e=a(t,r[0],i),n=String(e[0]);return[t.split(n)]}case`splits`:{if(typeof t!=`string`||r.length===0)return[];let n=a(t,r[0],i),o=String(n[0]);try{let n=r.length>1?String(a(t,r[1],i)[0]):`g`;return e(o,n.includes(`g`)?n:`${n}g`).split(t)}catch{return[]}}case`scan`:{if(typeof t!=`string`||r.length===0)return[];let n=a(t,r[0],i),o=String(n[0]);try{let n=r.length>1?String(a(t,r[1],i)[0]):``;return[...e(o,n.includes(`g`)?n:`${n}g`).matchAll(t)].map(e=>e.length>1?e.slice(1):e[0])}catch{return[]}}case`test`:{if(typeof t!=`string`||r.length===0)return[!1];let n=a(t,r[0],i),o=String(n[0]);try{return[e(o,r.length>1?String(a(t,r[1],i)[0]):``).test(t)]}catch{return[!1]}}case`match`:{if(typeof t!=`string`||r.length===0)return[null];let n=a(t,r[0],i),o=String(n[0]);try{let n=e(o,`${r.length>1?String(a(t,r[1],i)[0]):``}d`).exec(t);if(!n)return[];let s=n.indices;return[{offset:n.index,length:n[0].length,string:n[0],captures:n.slice(1).map((e,t)=>({offset:s?.[t+1]?.[0]??null,length:e?.length??0,string:e??``,name:null}))}]}catch{return[null]}}case`capture`:{if(typeof t!=`string`||r.length===0)return[null];let n=a(t,r[0],i),o=String(n[0]);try{let n=e(o,r.length>1?String(a(t,r[1],i)[0]):``).match(t);return!n||!n.groups?[Object.create(null)]:[n.groups]}catch{return[null]}}case`sub`:{if(typeof t!=`string`||r.length<2)return[null];let n=a(t,r[0],i),o=a(t,r[1],i),s=String(n[0]),c=String(o[0]);try{return[e(s,r.length>2?String(a(t,r[2],i)[0]):``).replace(t,c)]}catch{return[t]}}case`gsub`:{if(typeof t!=`string`||r.length<2)return[null];let n=a(t,r[0],i),o=a(t,r[1],i),s=String(n[0]),c=String(o[0]);try{let n=r.length>2?String(a(t,r[2],i)[0]):`g`;return[e(s,n.includes(`g`)?n:`${n}g`).replace(t,c)]}catch{return[t]}}case`ascii_downcase`:return typeof t==`string`?[t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))]:[null];case`ascii_upcase`:return typeof t==`string`?[t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))]:[null];case`ltrimstr`:{if(typeof t!=`string`||r.length===0)return[t];let e=a(t,r[0],i),n=String(e[0]);return[t.startsWith(n)?t.slice(n.length):t]}case`rtrimstr`:{if(typeof t!=`string`||r.length===0)return[t];let e=a(t,r[0],i),n=String(e[0]);return n===``?[t]:[t.endsWith(n)?t.slice(0,-n.length):t]}case`trimstr`:{if(typeof t!=`string`||r.length===0)return[t];let e=a(t,r[0],i),n=String(e[0]);if(n===``)return[t];let o=t;return o.startsWith(n)&&(o=o.slice(n.length)),o.endsWith(n)&&(o=o.slice(0,-n.length)),[o]}case`trim`:if(typeof t==`string`)return[t.trim()];throw Error(`trim input must be a string`);case`ltrim`:if(typeof t==`string`)return[t.trimStart()];throw Error(`trim input must be a string`);case`rtrim`:if(typeof t==`string`)return[t.trimEnd()];throw Error(`trim input must be a string`);case`startswith`:{if(typeof t!=`string`||r.length===0)return[!1];let e=a(t,r[0],i);return[t.startsWith(String(e[0]))]}case`endswith`:{if(typeof t!=`string`||r.length===0)return[!1];let e=a(t,r[0],i);return[t.endsWith(String(e[0]))]}case`ascii`:return typeof t==`string`&&t.length>0?[t.charCodeAt(0)]:[null];case`explode`:return typeof t==`string`?[Array.from(t).map(e=>e.codePointAt(0))]:[null];case`implode`:if(!Array.isArray(t))throw Error(`implode input must be an array`);return[t.map(e=>{if(typeof e==`string`)throw Error(`string (${JSON.stringify(e)}) can't be imploded, unicode codepoint needs to be numeric`);if(typeof e!=`number`||Number.isNaN(e))throw Error(`number (null) can't be imploded, unicode codepoint needs to be numeric`);let t=Math.trunc(e);return t<0||t>1114111||t>=55296&&t<=57343?String.fromCodePoint(65533):String.fromCodePoint(t)}).join(``)];default:return null}}function j(e,t){switch(t){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[1/0];case`nan`:return[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 M(e,t,n){if(t.length===0)return n;let[r,...i]=t;if(typeof r==`number`){if(e&&typeof e==`object`&&!Array.isArray(e))throw Error(`Cannot index object with number`);if(r>536870911)throw Error(`Array index too large`);if(r<0)throw Error(`Out of bounds negative array index`);let t=Array.isArray(e)?[...e]:[];for(;t.length<=r;)t.push(null);return t[r]=M(t[r],i,n),t}if(Array.isArray(e))throw Error(`Cannot index array with string`);if(!l(r))return e??Object.create(null);let o=u(e),s=o?c(o):Object.create(null);return a(s,r,M(Object.hasOwn(s,r)?s[r]:void 0,i,n)),s}function N(e,t){if(t.length===0)return null;if(t.length===1){let n=t[0];if(Array.isArray(e)&&typeof n==`number`){let t=[...e];return t.splice(n,1),t}if(e&&typeof e==`object`&&!Array.isArray(e)){let t=String(n);if(!l(t))return e;let r=c(e);return delete r[t],r}return e}let[n,...r]=t;if(Array.isArray(e)&&typeof n==`number`){let t=[...e];return t[n]=N(t[n],r),t}if(e&&typeof e==`object`&&!Array.isArray(e)){let t=String(n);if(!l(t))return e;let i=c(e);return Object.hasOwn(i,t)&&a(i,t,N(i[t],r)),i}return e}var P=class e extends Error{label;partialResults;constructor(e,t=[]){super(`break ${e}`),this.label=e,this.partialResults=t,this.name=`BreakError`}withPrependedResults(t){return new e(this.label,[...t,...this.partialResults])}},F=class extends Error{value;constructor(e){super(typeof e==`string`?e:JSON.stringify(e)),this.value=e,this.name=`JqError`}},I=1e4,L=2e3,te=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 ne(e){return{vars:new Map,limits:{maxIterations:e?.limits?.maxIterations??I,maxDepth:e?.limits?.maxDepth??L},env:e?.env,coverage:e?.coverage,requireDefenseContext:e?.requireDefenseContext,defenseContextChecked:!1}}function R(e,t,n){let r=new Map(e.vars);return r.set(t,n),{vars:r,limits:e.limits,env:e.env,requireDefenseContext:e.requireDefenseContext,defenseContextChecked:e.defenseContextChecked,root:e.root,currentPath:e.currentPath,funcs:e.funcs,labels:e.labels,coverage:e.coverage}}function z(e,t,n){switch(t.type){case`var`:return R(e,t.name,n);case`array`:{if(!Array.isArray(n))return null;let r=e;for(let e=0;e<t.elements.length;e++){let i=t.elements[e],a=e<n.length?n[e]:null,o=z(r,i,a);if(o===null)return null;r=o}return r}case`object`:{let r=u(n);if(!r)return null;let i=e;for(let a of t.fields){let t;if(typeof a.key==`string`)t=a.key;else{let r=W(n,a.key,e);if(r.length===0)return null;t=String(r[0])}let s=o(r,t)?r[t]:null;a.keyVar&&(i=R(i,a.keyVar,s));let c=z(i,a.pattern,s);if(c===null)return null;i=c}return i}}}function B(e,t){let n=e;for(let e of t)if(n&&typeof n==`object`)if(Array.isArray(n))if(typeof e==`number`)n=n[e];else return;else{let t=u(n);if(t&&typeof e==`string`&&Object.hasOwn(t,e))n=t[e];else return}else return;return n}function V(e){if(e.type===`Identity`)return[];if(e.type===`Field`){let t=e.base?V(e.base):[];return t===null?null:[...t,e.name]}if(e.type===`Index`&&e.index.type===`Literal`){let t=e.base?V(e.base):[];if(t===null)return null;let n=e.index.value;return typeof n==`number`||typeof n==`string`?[...t,n]:null}if(e.type===`Pipe`){let t=V(e.left);return t===null?null:H(t,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 H(e,t){if(t.type===`Call`){if(t.name===`parent`){let n=1;if(t.args.length>0&&t.args[0].type===`Literal`){let e=t.args[0].value;typeof e==`number`&&(n=e)}if(n>=0)return e.slice(0,Math.max(0,e.length-n));{let t=-n-1;return e.slice(0,Math.min(t,e.length))}}if(t.name===`root`)return[]}if(t.type===`Field`){let n=V(t);if(n!==null)return[...e,...n]}if(t.type===`Index`&&t.index.type===`Literal`){let n=V(t);if(n!==null)return[...e,...n]}if(t.type===`Pipe`){let n=H(e,t.left);return n===null?null:H(n,t.right)}return t.type===`Identity`?e:null}function U(e,n,r){if(n.type===`Comma`){let i=[];try{i.push(...W(e,n.left,r))}catch(e){if(e instanceof t)throw e;if(i.length>0)return i;throw Error(`evaluation failed`)}try{i.push(...W(e,n.right,r))}catch(e){if(e instanceof t)throw e;return i}return i}return W(e,n,r)}function W(e,t,r){let o=r&&`vars`in r?r:ne(r);switch(o.defenseContextChecked||(i(o.requireDefenseContext,`query-engine`,`evaluation`),o={...o,defenseContextChecked:!0}),o.root===void 0&&(o={...o,root:e,currentPath:[]}),o.coverage?.hit(`jq:node:${t.type}`),t.type){case`Identity`:return[e];case`Field`:return(t.base?W(e,t.base,o):[e]).flatMap(e=>{let n=u(e);if(n){if(!Object.hasOwn(n,t.name))return[null];let e=n[t.name];return[e===void 0?null:e]}if(e===null)return[null];throw Error(`Cannot index ${Array.isArray(e)?`array`:typeof e} with string "${t.name}"`)});case`Index`:return(t.base?W(e,t.base,o):[e]).flatMap(e=>W(e,t.index,o).flatMap(t=>{if(typeof t==`number`&&Array.isArray(e)){if(Number.isNaN(t))return[null];let n=Math.trunc(t),r=n<0?e.length+n:n;return r>=0&&r<e.length?[e[r]]:[null]}if(typeof t==`string`){let n=u(e);return!n||!Object.hasOwn(n,t)?[null]:[n[t]]}return[null]}));case`Slice`:return(t.base?W(e,t.base,o):[e]).flatMap(n=>{if(n===null)return[null];if(!Array.isArray(n)&&typeof n!=`string`)throw Error(`Cannot slice ${typeof n} (${JSON.stringify(n)})`);let r=n.length,i=t.start?W(e,t.start,o):[0],a=t.end?W(e,t.end,o):[r];return i.flatMap(e=>a.map(t=>{let i=e,a=t,o=Number.isNaN(i)?0:Number.isInteger(i)?i:Math.floor(i),s=Number.isNaN(a)?r:Number.isInteger(a)?a:Math.ceil(a),c=G(o,r),l=G(s,r);return n.slice(c,l)}))});case`Iterate`:return(t.base?W(e,t.base,o):[e]).flatMap(e=>Array.isArray(e)?e:e&&typeof e==`object`?Object.values(e):[]);case`Pipe`:{let n=W(e,t.left,o),r=V(t.left),i=[];for(let e of n)try{if(r!==null){let n={...o,currentPath:[...o.currentPath??[],...r]};i.push(...W(e,t.right,n))}else i.push(...W(e,t.right,o))}catch(e){throw e instanceof P?e.withPrependedResults(i):e}return i}case`Comma`:{let n=W(e,t.left,o),r=W(e,t.right,o);return[...n,...r]}case`Literal`:return[t.value];case`Array`:return t.elements?[W(e,t.elements,o)]:[[]];case`Object`:{let n=[Object.create(null)];for(let r of t.entries){let t=typeof r.key==`string`?[r.key]:W(e,r.key,o),i=W(e,r.value,o),s=[];for(let e of n)for(let n of t){if(typeof n!=`string`)throw Error(`Cannot use ${n===null?`null`:Array.isArray(n)?`array`:typeof n} (${JSON.stringify(n)}) as object key`);if(!l(n)){for(let t of i)s.push(c(e));continue}for(let t of i){let r=c(e);a(r,n,t),s.push(r)}}n.length=0,n.push(...s)}return n}case`Paren`:return W(e,t.expr,o);case`BinaryOp`:return J(e,t.op,t.left,t.right,o);case`UnaryOp`:return W(e,t.operand,o).map(e=>{if(t.op===`-`){if(typeof e==`number`)return-e;if(typeof e==`string`)throw Error(`string (${(e=>e.length>5?`"${e.slice(0,3)}...`:JSON.stringify(e))(e)}) cannot be negated`);return null}return t.op===`not`?!h(e):null});case`Cond`:return W(e,t.cond,o).flatMap(n=>{if(h(n))return W(e,t.then,o);for(let n of t.elifs)if(W(e,n.cond,o).some(h))return W(e,n.then,o);return t.else?W(e,t.else,o):[e]});case`Try`:try{return W(e,t.body,o)}catch(e){return t.catch?W(e instanceof F?e.value:e instanceof Error?e.message:String(e),t.catch,o):[]}case`Call`:return Y(e,t.name,t.args,o);case`VarBind`:return W(e,t.value,o).flatMap(n=>{let r=null,i=[];t.pattern?i.push(t.pattern):t.name&&i.push({type:`var`,name:t.name}),t.alternatives&&i.push(...t.alternatives);for(let e of i)if(r=z(o,e,n),r!==null)break;return r===null?[]:W(e,t.body,r)});case`VarRef`:{if(t.name===`$ENV`)return[o.env?n(o.env):Object.create(null)];let e=o.vars.get(t.name);return e===void 0?[null]:[e]}case`Recurse`:{let t=[],n=new WeakSet,r=e=>{if(e&&typeof e==`object`){if(n.has(e))return;n.add(e)}if(t.push(e),Array.isArray(e))for(let t of e)r(t);else if(e&&typeof e==`object`)for(let t of Object.keys(e))r(e[t])};return r(e),t}case`Optional`:try{return W(e,t.expr,o)}catch{return[]}case`StringInterp`:return[t.parts.map(t=>typeof t==`string`?t:W(e,t,o).map(e=>typeof e==`string`?e:JSON.stringify(e)).join(``)).join(``)];case`UpdateOp`:return[K(e,t.path,t.op,t.value,o)];case`Reduce`:{let n=W(e,t.expr,o),r=W(e,t.init,o)[0],i=o.limits.maxDepth??L;for(let e of n){let n;if(t.pattern){if(n=z(o,t.pattern,e),n===null)continue}else n=R(o,t.varName,e);if(r=W(r,t.update,n)[0],y(r,i+1)>i)return[null]}return[r]}case`Foreach`:{let n=W(e,t.expr,o),r=W(e,t.init,o)[0],i=[];for(let e of n)try{let n;if(t.pattern){if(n=z(o,t.pattern,e),n===null)continue}else n=R(o,t.varName,e);if(r=W(r,t.update,n)[0],t.extract){let e=W(r,t.extract,n);i.push(...e)}else i.push(r)}catch(e){throw e instanceof P?e.withPrependedResults(i):e}return i}case`Label`:try{return W(e,t.body,{...o,labels:new Set([...o.labels??[],t.name])})}catch(e){if(e instanceof P&&e.label===t.name)return e.partialResults;throw e}case`Break`:throw new P(t.name);case`Def`:{let n=new Map(o.funcs??[]),r=`${t.name}/${t.params.length}`;n.set(r,{params:t.params,body:t.funcBody,closure:new Map(o.funcs??[])});let i={...o,funcs:n};return W(e,t.body,i)}default:throw Error(`Unknown AST node type: ${t.type}`)}}function G(e,t){return e<0?Math.max(0,t+e):Math.min(e,t)}function K(e,t,n,r,i){function o(e,t){switch(n){case`=`:return t;case`|=`:return W(e,r,i)[0]??null;case`+=`:return typeof e==`number`&&typeof t==`number`||typeof e==`string`&&typeof t==`string`?e+t:Array.isArray(e)&&Array.isArray(t)?[...e,...t]:e&&t&&typeof e==`object`&&typeof t==`object`?s(e,t):t;case`-=`:return typeof e==`number`&&typeof t==`number`?e-t:e;case`*=`:return typeof e==`number`&&typeof t==`number`?e*t:e;case`/=`:return typeof e==`number`&&typeof t==`number`?e/t:e;case`%=`:return typeof e==`number`&&typeof t==`number`?e%t:e;case`//=`:return e===null||e===!1?t:e;default:return t}}function u(t,n,r){switch(n.type){case`Identity`:return r(t);case`Field`:if(!l(n.name))return t;if(n.base)return u(t,n.base,e=>{if(e&&typeof e==`object`&&!Array.isArray(e)){let t=c(e),i=Object.hasOwn(t,n.name)?t[n.name]:void 0;return a(t,n.name,r(i)),t}return e});if(t&&typeof t==`object`&&!Array.isArray(t)){let e=c(t),i=Object.hasOwn(e,n.name)?e[n.name]:void 0;return a(e,n.name,r(i)),e}return t;case`Index`:{let o=W(e,n.index,i)[0];if(typeof o==`number`&&Number.isNaN(o))throw Error(`Cannot set array element at NaN index`);if(typeof o==`number`&&!Number.isInteger(o)&&(o=Math.trunc(o)),n.base)return u(t,n.base,e=>{if(typeof o==`number`&&Array.isArray(e)){let t=[...e],n=o<0?t.length+o:o;if(n>=0){for(;t.length<=n;)t.push(null);t[n]=r(t[n])}return t}if(typeof o==`string`&&e&&typeof e==`object`&&!Array.isArray(e)){if(!l(o))return e;let t=c(e),n=Object.hasOwn(t,o)?t[o]:void 0;return a(t,o,r(n)),t}return e});if(typeof o==`number`){if(o>536870911)throw Error(`Array index too large`);if(o<0&&(!t||!Array.isArray(t)))throw Error(`Out of bounds negative array index`);if(Array.isArray(t)){let e=[...t],n=o<0?e.length+o:o;if(n>=0){for(;e.length<=n;)e.push(null);e[n]=r(e[n])}return e}if(t==null){let e=[];for(;e.length<=o;)e.push(null);return e[o]=r(null),e}return t}if(typeof o==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(o))return t;let e=c(t),n=Object.hasOwn(e,o)?e[o]:void 0;return a(e,o,r(n)),e}return t}case`Iterate`:{let e=e=>{if(Array.isArray(e))return e.map(e=>r(e));if(e&&typeof e==`object`){let t=Object.create(null);for(let[n,i]of Object.entries(e))l(n)&&a(t,n,r(i));return t}return e};return n.base?u(t,n.base,e):e(t)}case`Pipe`:return u(u(t,n.left,e=>e),n.right,r);default:return r(t)}}return u(e,t,t=>n===`|=`?o(t,t):o(t,W(e,r,i)[0]??null))}function q(e,t,n){function r(t,i,o){switch(i.type){case`Identity`:return o;case`Field`:if(!l(i.name))return t;if(i.base){let e=W(t,i.base,n)[0],a=r(e,{type:`Field`,name:i.name},o);return r(t,i.base,a)}if(t&&typeof t==`object`&&!Array.isArray(t)){let e=c(t);return a(e,i.name,o),e}return t;case`Index`:{if(i.base){let e=W(t,i.base,n)[0],a=r(e,{type:`Index`,index:i.index},o);return r(t,i.base,a)}let s=W(e,i.index,n)[0];if(typeof s==`number`&&Array.isArray(t)){let e=[...t],n=s<0?e.length+s:s;return n>=0&&n<e.length&&(e[n]=o),e}if(typeof s==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(s))return t;let e=c(t);return a(e,s,o),e}return t}default:return t}}function i(t,o){switch(o.type){case`Identity`:return null;case`Field`:if(!l(o.name))return t;if(o.base){let e=W(t,o.base,n)[0];if(e==null)return t;let a=i(e,{type:`Field`,name:o.name});return r(t,o.base,a)}if(t&&typeof t==`object`&&!Array.isArray(t)){if(!l(o.name))return t;let e=c(t);return delete e[o.name],e}return t;case`Index`:{if(o.base){let e=W(t,o.base,n)[0];if(e==null)return t;let a=i(e,{type:`Index`,index:o.index});return r(t,o.base,a)}let a=W(e,o.index,n)[0];if(typeof a==`number`&&Array.isArray(t)){let e=[...t],n=a<0?e.length+a:a;return n>=0&&n<e.length&&e.splice(n,1),e}if(typeof a==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(a))return t;let e=c(t);return delete e[a],e}return t}case`Iterate`:return Array.isArray(t)?[]:t&&typeof t==`object`?Object.create(null):t;case`Pipe`:{let r=function(t,i,o){switch(i.type){case`Identity`:return o;case`Field`:if(!l(i.name))return t;if(t&&typeof t==`object`&&!Array.isArray(t)){let e=c(t);return a(e,i.name,o),e}return t;case`Index`:{let r=W(e,i.index,n)[0];if(typeof r==`number`&&Array.isArray(t)){let e=[...t],n=r<0?e.length+r:r;return n>=0&&n<e.length&&(e[n]=o),e}if(typeof r==`string`&&t&&typeof t==`object`&&!Array.isArray(t)){if(!l(r))return t;let e=c(t);return a(e,r,o),e}return t}case`Pipe`:{let e=W(t,i.left,n)[0],a=r(e,i.right,o);return r(t,i.left,a)}default:return t}},s=o.left,u=o.right,d=W(t,s,n)[0];return d==null?t:r(t,s,i(d,u))}default:return t}}return i(e,t)}function J(e,t,n,r,i){if(t===`and`)return W(e,n,i).flatMap(t=>h(t)?W(e,r,i).map(e=>h(e)):[!1]);if(t===`or`)return W(e,n,i).flatMap(t=>h(t)?[!0]:W(e,r,i).map(e=>h(e)));if(t===`//`){let t=W(e,n,i).filter(e=>e!=null&&e!==!1);return t.length>0?t:W(e,r,i)}let a=W(e,n,i),o=W(e,r,i);return a.flatMap(e=>o.map(n=>{switch(t){case`+`:return e===null?n:n===null?e:typeof e==`number`&&typeof n==`number`||typeof e==`string`&&typeof n==`string`?e+n:Array.isArray(e)&&Array.isArray(n)?[...e,...n]:e&&n&&typeof e==`object`&&typeof n==`object`&&!Array.isArray(e)&&!Array.isArray(n)?s(e,n):null;case`-`:if(typeof e==`number`&&typeof n==`number`)return e-n;if(Array.isArray(e)&&Array.isArray(n)){let t=new Set(n.map(e=>JSON.stringify(e)));return e.filter(e=>!t.has(JSON.stringify(e)))}if(typeof e==`string`&&typeof n==`string`){let t=e=>e.length>10?`"${e.slice(0,10)}...`:JSON.stringify(e);throw Error(`string (${t(e)}) and string (${t(n)}) cannot be subtracted`)}return null;case`*`:if(typeof e==`number`&&typeof n==`number`)return e*n;if(typeof e==`string`&&typeof n==`number`)return e.repeat(n);{let t=u(e),r=u(n);if(t&&r)return v(t,r)}return null;case`/`:if(typeof e==`number`&&typeof n==`number`){if(n===0)throw Error(`number (${e}) and number (${n}) cannot be divided because the divisor is zero`);return e/n}return typeof e==`string`&&typeof n==`string`?e.split(n):null;case`%`:if(typeof e==`number`&&typeof n==`number`){if(n===0)throw Error(`number (${e}) and number (${n}) cannot be divided (remainder) because the divisor is zero`);return!Number.isFinite(e)&&!Number.isNaN(e)?!Number.isFinite(n)&&!Number.isNaN(n)&&e<0&&n>0?-1:0:e%n}return null;case`==`:return g(e,n);case`!=`:return!g(e,n);case`<`:return _(e,n)<0;case`<=`:return _(e,n)<=0;case`>`:return _(e,n)>0;case`>=`:return _(e,n)>=0;default:return null}}))}function Y(e,r,i,a){let o=te.get(r);if(o)return typeof e==`number`?[o(e)]:[null];let s=T(e,r,i,a,W);if(s!==null)return s;let c=A(e,r,i,a,W);if(c!==null)return c;let l=m(e,r,i,a,W);if(l!==null)return l;let u=C(e,r,a.limits.maxDepth);if(u!==null)return u;let d=j(e,r);if(d!==null)return d;let _=O(e,r,i,a,W);if(_!==null)return _;let v=f(e,r,i,a,W,U,b,h,x,t);if(v!==null)return v;let y=ee(e,r,i,a,W,h,M,N,q,X);if(y!==null)return y;let S=w(e,r,i,a,W,g);if(S!==null)return S;let D=p(e,r,i,a,W,U,h,t);if(D!==null)return D;let P=E(e,r,i,a,W,h,B,Y);if(P!==null)return P;let I=k(e,r,i,a,W,g);if(I!==null)return I;switch(r){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`.split(`.`)];case`error`:throw new F(i.length>0?W(e,i[0],a)[0]:e);case`env`:return[a.env?n(a.env):Object.create(null)];case`debug`:return[e];case`input_line_number`:return[1];default:{let t=`${r}/${i.length}`,n=a.funcs?.get(t);if(n){let r=n.closure??a.funcs??new Map,o=new Map(r);o.set(t,n);for(let t=0;t<n.params.length;t++){let r=n.params[t],s=i[t];if(s){let t=W(e,s,a),n;if(t.length===0)n={type:`Call`,name:`empty`,args:[]};else if(t.length===1)n={type:`Literal`,value:t[0]};else{n={type:`Literal`,value:t[t.length-1]};for(let e=t.length-2;e>=0;e--)n={type:`Comma`,left:{type:`Literal`,value:t[e]},right:n}}o.set(`${r}/0`,{params:[],body:n})}}let s={...a,funcs:o};return W(e,n.body,s)}throw Error(`Unknown function: ${r}`)}}}function X(e,t,n,r,i){if(t.type===`Comma`){let a=t;X(e,a.left,n,r,i),X(e,a.right,n,r,i);return}let a=V(t);if(a!==null){i.push([...r,...a]);return}if(t.type===`Iterate`){if(Array.isArray(e))for(let t=0;t<e.length;t++)i.push([...r,t]);else if(e&&typeof e==`object`)for(let t of Object.keys(e))i.push([...r,t]);return}if(t.type===`Recurse`){let t=(e,n)=>{if(i.push([...r,...n]),e&&typeof e==`object`)if(Array.isArray(e))for(let r=0;r<e.length;r++)t(e[r],[...n,r]);else for(let r of Object.keys(e))t(e[r],[...n,r])};t(e,[]);return}if(t.type===`Pipe`){let a=V(t.left);if(a!==null){let o=W(e,t.left,n);for(let e of o)X(e,t.right,n,[...r,...a],i);return}}W(e,t,n).length>0&&i.push(r)}var Z=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`]]),Q=new Set(Z.values());function $(e){let t=[],n=0,r=(t=0)=>e[n+t],i=()=>e[n++],a=()=>n>=e.length,o=e=>e>=`0`&&e<=`9`,s=e=>e>=`a`&&e<=`z`||e>=`A`&&e<=`Z`||e===`_`,c=e=>s(e)||o(e);for(;!a();){let l=n,u=i();if(!(u===` `||u===` `||u===`
|
|
3
3
|
`||u===`\r`)){if(u===`#`){for(;!a()&&r()!==`
|
|
4
4
|
`;)i();continue}if(u===`.`&&r()===`.`){i(),t.push({type:`DOTDOT`,pos:l});continue}if(u===`=`&&r()===`=`){i(),t.push({type:`EQ`,pos:l});continue}if(u===`!`&&r()===`=`){i(),t.push({type:`NE`,pos:l});continue}if(u===`<`&&r()===`=`){i(),t.push({type:`LE`,pos:l});continue}if(u===`>`&&r()===`=`){i(),t.push({type:`GE`,pos:l});continue}if(u===`/`&&r()===`/`){i(),r()===`=`?(i(),t.push({type:`UPDATE_ALT`,pos:l})):t.push({type:`ALT`,pos:l});continue}if(u===`+`&&r()===`=`){i(),t.push({type:`UPDATE_ADD`,pos:l});continue}if(u===`-`&&r()===`=`){i(),t.push({type:`UPDATE_SUB`,pos:l});continue}if(u===`*`&&r()===`=`){i(),t.push({type:`UPDATE_MUL`,pos:l});continue}if(u===`/`&&r()===`=`){i(),t.push({type:`UPDATE_DIV`,pos:l});continue}if(u===`%`&&r()===`=`){i(),t.push({type:`UPDATE_MOD`,pos:l});continue}if(u===`=`&&r()!==`=`){t.push({type:`ASSIGN`,pos:l});continue}if(u===`.`){t.push({type:`DOT`,pos:l});continue}if(u===`|`){r()===`=`?(i(),t.push({type:`UPDATE_PIPE`,pos:l})):t.push({type:`PIPE`,pos:l});continue}if(u===`,`){t.push({type:`COMMA`,pos:l});continue}if(u===`:`){t.push({type:`COLON`,pos:l});continue}if(u===`;`){t.push({type:`SEMICOLON`,pos:l});continue}if(u===`(`){t.push({type:`LPAREN`,pos:l});continue}if(u===`)`){t.push({type:`RPAREN`,pos:l});continue}if(u===`[`){t.push({type:`LBRACKET`,pos:l});continue}if(u===`]`){t.push({type:`RBRACKET`,pos:l});continue}if(u===`{`){t.push({type:`LBRACE`,pos:l});continue}if(u===`}`){t.push({type:`RBRACE`,pos:l});continue}if(u===`?`){t.push({type:`QUESTION`,pos:l});continue}if(u===`+`){t.push({type:`PLUS`,pos:l});continue}if(u===`-`){t.push({type:`MINUS`,pos:l});continue}if(u===`*`){t.push({type:`STAR`,pos:l});continue}if(u===`/`){t.push({type:`SLASH`,pos:l});continue}if(u===`%`){t.push({type:`PERCENT`,pos:l});continue}if(u===`<`){t.push({type:`LT`,pos:l});continue}if(u===`>`){t.push({type:`GT`,pos:l});continue}if(o(u)){let s=u;for(;!a()&&(o(r())||r()===`.`||r()===`e`||r()===`E`);)(r()===`e`||r()===`E`)&&(e[n+1]===`+`||e[n+1]===`-`)&&(s+=i()),s+=i();t.push({type:`NUMBER`,value:Number(s),pos:l});continue}if(u===`"`){let e=``;for(;!a()&&r()!==`"`;)if(r()===`\\`){if(i(),a())break;let t=i();switch(t){case`n`:e+=`
|
|
5
5
|
`;break;case`r`:e+=`\r`;break;case`t`:e+=` `;break;case`\\`:e+=`\\`;break;case`"`:e+=`"`;break;case`(`:e+=`\\(`;break;default:e+=t}}else e+=i();a()||i(),t.push({type:`STRING`,value:e,pos:l});continue}if(s(u)||u===`$`||u===`@`){let e=u;for(;!a()&&c(r());)e+=i();let n=Z.get(e);n?t.push({type:n,value:e,pos:l}):t.push({type:`IDENT`,value:e,pos:l});continue}throw Error(`Unexpected character '${u}' at position ${l}`)}}return t.push({type:`EOF`,pos:n}),t}var re=class e{tokens;pos=0;constructor(e){this.tokens=e}peek(e=0){return this.tokens[this.pos+e]??{type:`EOF`,pos:-1}}advance(){return this.tokens[this.pos++]}check(e){return this.peek().type===e}match(...e){for(let t of e)if(this.check(t))return this.advance();return null}expect(e,t){if(!this.check(e))throw Error(`${t} at position ${this.peek().pos}, got ${this.peek().type}`);return this.advance()}isFieldNameAfterDot(e=0){let t=this.peek(e),n=this.peek(e+1);return n.type===`STRING`?!0:n.type===`IDENT`||Q.has(n.type)?n.pos===t.pos+1:!1}isIdentLike(){let e=this.peek().type;return e===`IDENT`||Q.has(e)}consumeFieldNameAfterDot(e){let t=this.peek();return t.type===`STRING`||(t.type===`IDENT`||Q.has(t.type))&&t.pos===e.pos+1?this.advance().value:null}parse(){let e=this.parseExpr();if(!this.check(`EOF`))throw Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`);return e}parseExpr(){return this.parsePipe()}parsePattern(){if(this.match(`LBRACKET`)){let e=[];if(!this.check(`RBRACKET`))for(e.push(this.parsePattern());this.match(`COMMA`)&&!this.check(`RBRACKET`);)e.push(this.parsePattern());return this.expect(`RBRACKET`,`Expected ']' after array pattern`),{type:`array`,elements:e}}if(this.match(`LBRACE`)){let e=[];if(!this.check(`RBRACE`))for(e.push(this.parsePatternField());this.match(`COMMA`)&&!this.check(`RBRACE`);)e.push(this.parsePatternField());return this.expect(`RBRACE`,`Expected '}' after object pattern`),{type:`object`,fields:e}}let e=this.expect(`IDENT`,`Expected variable name in pattern`),t=e.value;if(!t.startsWith(`$`))throw Error(`Variable name must start with $ at position ${e.pos}`);return{type:`var`,name:t}}parsePatternField(){if(this.match(`LPAREN`)){let e=this.parseExpr();return this.expect(`RPAREN`,`Expected ')' after computed key`),this.expect(`COLON`,`Expected ':' after computed key`),{key:e,pattern:this.parsePattern()}}let e=this.peek();if(e.type===`IDENT`||Q.has(e.type)){let t=e.value;if(t.startsWith(`$`)){if(this.advance(),this.match(`COLON`)){let e=this.parsePattern();return{key:t.slice(1),pattern:e,keyVar:t}}return{key:t.slice(1),pattern:{type:`var`,name:t}}}return this.advance(),this.match(`COLON`)?{key:t,pattern:this.parsePattern()}:{key:t,pattern:{type:`var`,name:`$${t}`}}}throw Error(`Expected field name in object pattern at position ${e.pos}`)}parsePipe(){let e=this.parseComma();for(;this.match(`PIPE`);){let t=this.parseComma();e={type:`Pipe`,left:e,right:t}}return e}parseComma(){let e=this.parseVarBind();for(;this.match(`COMMA`);){let t=this.parseVarBind();e={type:`Comma`,left:e,right:t}}return e}parseVarBind(){let e=this.parseUpdate();if(this.match(`AS`)){let t=this.parsePattern(),n=[];for(;this.check(`QUESTION`)&&this.peekAhead(1)?.type===`ALT`;)this.advance(),this.advance(),n.push(this.parsePattern());this.expect(`PIPE`,`Expected '|' after variable binding`);let r=this.parseExpr();return t.type===`var`&&n.length===0?{type:`VarBind`,name:t.name,value:e,body:r}:{type:`VarBind`,name:t.type===`var`?t.name:``,value:e,body:r,pattern:t.type===`var`?void 0:t,alternatives:n.length>0?n:void 0}}return e}peekAhead(e){let t=this.pos+e;return t<this.tokens.length?this.tokens[t]:void 0}parseUpdate(){let e=this.parseAlt(),t=new Map([[`ASSIGN`,`=`],[`UPDATE_ADD`,`+=`],[`UPDATE_SUB`,`-=`],[`UPDATE_MUL`,`*=`],[`UPDATE_DIV`,`/=`],[`UPDATE_MOD`,`%=`],[`UPDATE_ALT`,`//=`],[`UPDATE_PIPE`,`|=`]]),n=this.match(`ASSIGN`,`UPDATE_ADD`,`UPDATE_SUB`,`UPDATE_MUL`,`UPDATE_DIV`,`UPDATE_MOD`,`UPDATE_ALT`,`UPDATE_PIPE`);if(n){let r=this.parseVarBind(),i=t.get(n.type);if(i)return{type:`UpdateOp`,op:i,path:e,value:r}}return e}parseAlt(){let e=this.parseOr();for(;this.match(`ALT`);){let t=this.parseOr();e={type:`BinaryOp`,op:`//`,left:e,right:t}}return e}parseOr(){let e=this.parseAnd();for(;this.match(`OR`);){let t=this.parseAnd();e={type:`BinaryOp`,op:`or`,left:e,right:t}}return e}parseAnd(){let e=this.parseNot();for(;this.match(`AND`);){let t=this.parseNot();e={type:`BinaryOp`,op:`and`,left:e,right:t}}return e}parseNot(){return this.parseComparison()}parseComparison(){let e=this.parseAddSub(),t=new Map([[`EQ`,`==`],[`NE`,`!=`],[`LT`,`<`],[`LE`,`<=`],[`GT`,`>`],[`GE`,`>=`]]),n=this.match(`EQ`,`NE`,`LT`,`LE`,`GT`,`GE`);if(n){let r=t.get(n.type);if(r){let t=this.parseAddSub();e={type:`BinaryOp`,op:r,left:e,right:t}}}return e}parseAddSub(){let e=this.parseMulDiv();for(;;)if(this.match(`PLUS`)){let t=this.parseMulDiv();e={type:`BinaryOp`,op:`+`,left:e,right:t}}else if(this.match(`MINUS`)){let t=this.parseMulDiv();e={type:`BinaryOp`,op:`-`,left:e,right:t}}else break;return e}parseMulDiv(){let e=this.parseUnary();for(;;)if(this.match(`STAR`)){let t=this.parseUnary();e={type:`BinaryOp`,op:`*`,left:e,right:t}}else if(this.match(`SLASH`)){let t=this.parseUnary();e={type:`BinaryOp`,op:`/`,left:e,right:t}}else if(this.match(`PERCENT`)){let t=this.parseUnary();e={type:`BinaryOp`,op:`%`,left:e,right:t}}else break;return e}parseUnary(){return this.match(`MINUS`)?{type:`UnaryOp`,op:`-`,operand:this.parseUnary()}:this.parsePostfix()}parsePostfix(){let e=this.parsePrimary();for(;;)if(this.match(`QUESTION`))e={type:`Optional`,expr:e};else if(this.check(`DOT`)&&this.isFieldNameAfterDot())this.advance(),e={type:`Field`,name:this.advance().value,base:e};else if(this.check(`LBRACKET`))if(this.advance(),this.match(`RBRACKET`))e={type:`Iterate`,base:e};else if(this.check(`COLON`)){this.advance();let t=this.check(`RBRACKET`)?void 0:this.parseExpr();this.expect(`RBRACKET`,`Expected ']'`),e={type:`Slice`,end:t,base:e}}else{let t=this.parseExpr();if(this.match(`COLON`)){let n=this.check(`RBRACKET`)?void 0:this.parseExpr();this.expect(`RBRACKET`,`Expected ']'`),e={type:`Slice`,start:t,end:n,base:e}}else this.expect(`RBRACKET`,`Expected ']'`),e={type:`Index`,index:t,base:e}}else break;return e}parsePrimary(){if(this.match(`DOTDOT`))return{type:`Recurse`};if(this.check(`DOT`)){let e=this.advance();if(this.check(`LBRACKET`)){if(this.advance(),this.match(`RBRACKET`))return{type:`Iterate`};if(this.check(`COLON`)){this.advance();let e=this.check(`RBRACKET`)?void 0:this.parseExpr();return this.expect(`RBRACKET`,`Expected ']'`),{type:`Slice`,end:e}}let e=this.parseExpr();if(this.match(`COLON`)){let t=this.check(`RBRACKET`)?void 0:this.parseExpr();return this.expect(`RBRACKET`,`Expected ']'`),{type:`Slice`,start:e,end:t}}return this.expect(`RBRACKET`,`Expected ']'`),{type:`Index`,index:e}}let t=this.consumeFieldNameAfterDot(e);return t===null?{type:`Identity`}:{type:`Field`,name:t}}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 e=this.advance().value;return e.includes(`\\(`)?this.parseStringInterpolation(e):{type:`Literal`,value:e}}if(this.match(`LBRACKET`)){if(this.match(`RBRACKET`))return{type:`Array`};let e=this.parseExpr();return this.expect(`RBRACKET`,`Expected ']'`),{type:`Array`,elements:e}}if(this.match(`LBRACE`))return this.parseObjectConstruction();if(this.match(`LPAREN`)){let e=this.parseExpr();return this.expect(`RPAREN`,`Expected ')'`),{type:`Paren`,expr:e}}if(this.match(`IF`))return this.parseIf();if(this.match(`TRY`)){let e=this.parsePostfix(),t;return this.match(`CATCH`)&&(t=this.parsePostfix()),{type:`Try`,body:e,catch:t}}if(this.match(`REDUCE`)){let e=this.parseAddSub();this.expect(`AS`,`Expected 'as' after reduce expression`);let t=this.parsePattern();this.expect(`LPAREN`,`Expected '(' after variable`);let n=this.parseExpr();this.expect(`SEMICOLON`,`Expected ';' after init expression`);let r=this.parseExpr();return this.expect(`RPAREN`,`Expected ')' after update expression`),{type:`Reduce`,expr:e,varName:t.type===`var`?t.name:``,init:n,update:r,pattern:t.type===`var`?void 0:t}}if(this.match(`FOREACH`)){let e=this.parseAddSub();this.expect(`AS`,`Expected 'as' after foreach expression`);let t=this.parsePattern();this.expect(`LPAREN`,`Expected '(' after variable`);let n=this.parseExpr();this.expect(`SEMICOLON`,`Expected ';' after init expression`);let r=this.parseExpr(),i;return this.match(`SEMICOLON`)&&(i=this.parseExpr()),this.expect(`RPAREN`,`Expected ')' after expressions`),{type:`Foreach`,expr:e,varName:t.type===`var`?t.name:``,init:n,update:r,extract:i,pattern:t.type===`var`?void 0:t}}if(this.match(`LABEL`)){let e=this.expect(`IDENT`,`Expected label name (e.g., $out)`),t=e.value;if(!t.startsWith(`$`))throw Error(`Label name must start with $ at position ${e.pos}`);return this.expect(`PIPE`,`Expected '|' after label name`),{type:`Label`,name:t,body:this.parseExpr()}}if(this.match(`BREAK`)){let e=this.expect(`IDENT`,`Expected label name to break to`),t=e.value;if(!t.startsWith(`$`))throw Error(`Break label must start with $ at position ${e.pos}`);return{type:`Break`,name:t}}if(this.match(`DEF`)){let e=this.expect(`IDENT`,`Expected function name after def`).value,t=[];if(this.match(`LPAREN`)){if(!this.check(`RPAREN`)){let e=this.expect(`IDENT`,`Expected parameter name`);for(t.push(e.value);this.match(`SEMICOLON`);){let e=this.expect(`IDENT`,`Expected parameter name`);t.push(e.value)}}this.expect(`RPAREN`,`Expected ')' after parameters`)}this.expect(`COLON`,`Expected ':' after function name`);let n=this.parseExpr();return this.expect(`SEMICOLON`,`Expected ';' after function body`),{type:`Def`,name:e,params:t,funcBody:n,body:this.parseExpr()}}if(this.match(`NOT`))return{type:`Call`,name:`not`,args:[]};if(this.check(`IDENT`)){let e=this.advance().value;if(e.startsWith(`$`))return{type:`VarRef`,name:e};if(this.match(`LPAREN`)){let t=[];if(!this.check(`RPAREN`))for(t.push(this.parseExpr());this.match(`SEMICOLON`);)t.push(this.parseExpr());return this.expect(`RPAREN`,`Expected ')'`),{type:`Call`,name:e,args:t}}return{type:`Call`,name:e,args:[]}}throw Error(`Unexpected token ${this.peek().type} at position ${this.peek().pos}`)}parseObjectConstruction(){let e=[];if(!this.check(`RBRACE`))do{let t,n;if(this.match(`LPAREN`))t=this.parseExpr(),this.expect(`RPAREN`,`Expected ')'`),this.expect(`COLON`,`Expected ':'`),n=this.parseObjectValue();else if(this.isIdentLike()){let e=this.advance().value;this.match(`COLON`)?(t=e,n=this.parseObjectValue()):(t=e,n={type:`Field`,name:e})}else if(this.check(`STRING`))t=this.advance().value,this.expect(`COLON`,`Expected ':'`),n=this.parseObjectValue();else throw Error(`Expected object key at position ${this.peek().pos}`);e.push({key:t,value:n})}while(this.match(`COMMA`));return this.expect(`RBRACE`,`Expected '}'`),{type:`Object`,entries:e}}parseObjectValue(){let e=this.parseVarBind();for(;this.match(`PIPE`);){let t=this.parseVarBind();e={type:`Pipe`,left:e,right:t}}return e}parseIf(){let e=this.parseExpr();this.expect(`THEN`,`Expected 'then'`);let t=this.parseExpr(),n=[];for(;this.match(`ELIF`);){let e=this.parseExpr();this.expect(`THEN`,`Expected 'then' after elif`);let t=this.parseExpr();n.push({cond:e,then:t})}let r;return this.match(`ELSE`)&&(r=this.parseExpr()),this.expect(`END`,`Expected 'end'`),{type:`Cond`,cond:e,then:t,elifs:n,else:r}}parseStringInterpolation(t){let n=[],r=``,i=0;for(;i<t.length;)if(t[i]===`\\`&&t[i+1]===`(`){r&&=(n.push(r),``),i+=2;let a=1,o=``;for(;i<t.length&&a>0;)t[i]===`(`?a++:t[i]===`)`&&a--,a>0&&(o+=t[i]),i++;let s=new e($(o));n.push(s.parse())}else r+=t[i],i++;return r&&n.push(r),{type:`StringInterp`,parts:n}}};function ie(e){return new re($(e)).parse()}export{W as n,ie as t};
|
|
6
|
-
//# sourceMappingURL=chunk-BBXLRYSX-
|
|
6
|
+
//# sourceMappingURL=chunk-BBXLRYSX-K758HlCs.mjs.map
|