@inkeep/open-knowledge 0.25.0-beta.10 → 0.25.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alias-JE7RI5QX-DmHh8yog.mjs +1 -0
- package/dist/{architectureDiagram-Q4EWVU46-Dwlx8W7J.mjs → architectureDiagram-Q4EWVU46-C9cSuC8m.mjs} +2 -2
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/awk2-POPGKRAI-C7696e-z.mjs +1 -0
- package/dist/base64-4YMZCVJ5-BIHNwDj2.mjs +1 -0
- package/dist/basename-AA2KJYZQ-Dcz4Ls85.mjs +1 -0
- package/dist/bash-IJWYRKFO-DgruzS3i.mjs +1 -0
- package/dist/{blockDiagram-DXYQGD6D-D_l7RLVS.mjs → blockDiagram-DXYQGD6D-Dr7L7QsL.mjs} +2 -2
- package/dist/{build-CCNlCFyu.mjs → build-CN003PPg.mjs} +1 -1
- package/dist/build-Ca40rJCO.mjs +1 -0
- package/dist/{c4Diagram-AHTNJAMY-QadWjRVL.mjs → c4Diagram-AHTNJAMY-CPm6kKNR.mjs} +2 -2
- package/dist/cat-RDUMLXKC-BJJIS9lB.mjs +1 -0
- package/dist/channel-DE79NHCf.mjs +2 -0
- package/dist/chmod-SYMGL4JA-C1Ie7s0s.mjs +1 -0
- package/dist/{chokidar-D1eNAlbX.mjs → chokidar-oNPiNLWX.mjs} +3 -3
- package/dist/{chunk-24IMIIXA-BoP5OA93.mjs → chunk-24IMIIXA-DaS5XS55.mjs} +2 -2
- package/dist/{chunk-336JU56O-5giJrfiv.mjs → chunk-336JU56O-KTMEs5Wk.mjs} +2 -2
- package/dist/{chunk-3THT3N7L-CBWmNncQ.mjs → chunk-3THT3N7L-B1WzJUh4.mjs} +1 -1
- package/dist/{chunk-426QAEUC-BGn1TCpd.mjs → chunk-426QAEUC-DUpKwtVu.mjs} +2 -2
- package/dist/{chunk-44UOCSGV-B6GSHp1s.mjs → chunk-44UOCSGV-BZ6LfyW2.mjs} +1 -1
- package/dist/{chunk-4TB4RGXK-DWREoP49.mjs → chunk-4TB4RGXK-Ct6WjPoY.mjs} +2 -2
- package/dist/{chunk-5FUZZQ4R-DFR5eSi-.mjs → chunk-5FUZZQ4R-Bf6nbyQG.mjs} +2 -2
- package/dist/{chunk-5PVQY5BW-C5V4E1lO.mjs → chunk-5PVQY5BW-DUXm3tDu.mjs} +2 -2
- package/dist/{chunk-5QMZ5MUS-_0tQyQsf.mjs → chunk-5QMZ5MUS-BwpNU33k.mjs} +2 -2
- package/dist/{chunk-62RKD26F-K5NW6_Si.mjs → chunk-62RKD26F-DebCAz0V.mjs} +2 -2
- package/dist/{chunk-A4JSPFCI-BA544Kdp.mjs → chunk-A4JSPFCI-CQJoYugB.mjs} +2 -2
- package/dist/{chunk-A5O5YHGN-Kbs3GRxW.mjs → chunk-A5O5YHGN-DApqA6Ow.mjs} +2 -2
- package/dist/{chunk-BBXLRYSX-OVlWa2B-.mjs → chunk-BBXLRYSX-XWD4jM9A.mjs} +2 -2
- package/dist/{chunk-BRGMQKJV-DtyxDw61.mjs → chunk-BRGMQKJV-CZUkYGAZ.mjs} +3 -3
- package/dist/{chunk-CR5AFCPT-BD_awIEP.mjs → chunk-CR5AFCPT-DN7EAdus.mjs} +2 -2
- package/dist/{chunk-CWQS3NFK-DNm_iIwd.mjs → chunk-CWQS3NFK-BkE4vqrf.mjs} +1 -1
- package/dist/{chunk-D6CWQ5DW-CaV8X9is.mjs → chunk-D6CWQ5DW-CF9bBHyK.mjs} +2 -2
- package/dist/{chunk-DXB73IDG-Bx-Ikbnu.mjs → chunk-DXB73IDG-F_tmy-Lz.mjs} +1 -1
- package/dist/{chunk-EDXVE4YY-B_wA-KGy.mjs → chunk-EDXVE4YY-CI4s3JHP.mjs} +2 -2
- package/dist/{chunk-ENJZ2VHE-DwiyImt2.mjs → chunk-ENJZ2VHE-CQwjtY5A.mjs} +2 -2
- package/dist/{chunk-F55TLFGB-AEzanSfe.mjs → chunk-F55TLFGB-BZSRX-Vi.mjs} +2 -2
- package/dist/{chunk-FEIOJCZD-D6YUa1Xl.mjs → chunk-FEIOJCZD-NzTooVTc.mjs} +2 -2
- package/dist/{chunk-GFQRA5P5-DigWkxW2.mjs → chunk-GFQRA5P5-DbAN9IDm.mjs} +1 -1
- package/dist/{chunk-GOV5EKKI-x0jEbztj.mjs → chunk-GOV5EKKI-CDGzZWfT.mjs} +2 -2
- package/dist/{chunk-HWBSOZZR-DaPTwPxK.mjs → chunk-HWBSOZZR-DQTTl_pa.mjs} +3 -3
- package/dist/{chunk-I57KEIP3-DpiJySG6.mjs → chunk-I57KEIP3-DSoF8c_0.mjs} +2 -2
- package/dist/{chunk-ICPOFSXX-D0MVsm4H.mjs → chunk-ICPOFSXX-C--tVIY5.mjs} +2 -2
- package/dist/{chunk-IPJHKYVM-DlQCOz2c.mjs → chunk-IPJHKYVM-CUKythEA.mjs} +1 -1
- package/dist/{chunk-J642UCRS-C1PS8Hwf.mjs → chunk-J642UCRS-HjD8qpZD.mjs} +2 -2
- package/dist/{chunk-LPQPILI2-GOcK96AE.mjs → chunk-LPQPILI2-OoVL_l9j.mjs} +2 -2
- package/dist/{chunk-MDDMCKUK-CuQlmIio.mjs → chunk-MDDMCKUK-ChL1CU4m.mjs} +2 -2
- package/dist/{chunk-MIZPJHVH-Bo1j-3C3.mjs → chunk-MIZPJHVH-BD7tHmLL.mjs} +2 -2
- package/dist/{chunk-MLXIYONF-DRuy-_4a.mjs → chunk-MLXIYONF-CV7WHBm-.mjs} +2 -2
- package/dist/{chunk-NAERJDUW-0UrOIQ6q.mjs → chunk-NAERJDUW-Cyg2DAzO.mjs} +2 -2
- package/dist/{chunk-NUYSJFDK-BvwS54ju.mjs → chunk-NUYSJFDK-BH2DjyxF.mjs} +2 -2
- package/dist/{chunk-NYQYO467-KfHLMnUW.mjs → chunk-NYQYO467-CY88QCuT.mjs} +2 -2
- package/dist/{chunk-OARHFVLG-Csb_cJVS.mjs → chunk-OARHFVLG-dXiYYC4o.mjs} +2 -2
- package/dist/{chunk-OCLXQMOG-CCPg8vjW.mjs → chunk-OCLXQMOG-DOkdFgyf.mjs} +2 -2
- package/dist/{chunk-OCS6LSEM-DkbaohJu.mjs → chunk-OCS6LSEM-Bcx6uxmm.mjs} +2 -2
- package/dist/{chunk-OJDRYQWQ-LGuZyK6R.mjs → chunk-OJDRYQWQ-CmrD0Dg2.mjs} +1 -1
- package/dist/{chunk-OL3S66CO-CBdL6pp1.mjs → chunk-OL3S66CO-CWEDi2F_.mjs} +2 -2
- package/dist/{chunk-OYMX7WX6-BrOfVMt8.mjs → chunk-OYMX7WX6-Dvg98Zb-.mjs} +2 -2
- package/dist/{chunk-PBXLG62G-C7MEQojr.mjs → chunk-PBXLG62G-CpvczNyQ.mjs} +2 -2
- package/dist/{chunk-R6VWJ2ZL-XKIhMSUi.mjs → chunk-R6VWJ2ZL-BVeTwIsz.mjs} +1 -1
- package/dist/{chunk-SYMJJMQ4-DUF5hY-A.mjs → chunk-SYMJJMQ4-jdmKoBFb.mjs} +2 -2
- package/dist/{chunk-T56QNPHK-B6DfVzfs.mjs → chunk-T56QNPHK-DmDxJbbD.mjs} +2 -2
- package/dist/{chunk-TLSUDHID-SuIGgADo.mjs → chunk-TLSUDHID-CSDR438C.mjs} +2 -2
- package/dist/{chunk-TOMNU26N-Dw9Enq1O.mjs → chunk-TOMNU26N-CrDa7MpH.mjs} +2 -2
- package/dist/{chunk-U2HBQHQK-DB1SzWgs.mjs → chunk-U2HBQHQK-C1Q2DiEX.mjs} +2 -2
- package/dist/{chunk-UNYNJIFU-HSzsM3a6.mjs → chunk-UNYNJIFU-CZ2Mla0s.mjs} +3 -3
- package/dist/{chunk-VLGZJRPG-CHtdu0KZ.mjs → chunk-VLGZJRPG-DpYP_EVp.mjs} +2 -2
- package/dist/{chunk-X2U36JSP-CqOGcGN3.mjs → chunk-X2U36JSP-BiF0R9ys.mjs} +2 -2
- package/dist/{chunk-XHM67O4N-2lBQUjKO.mjs → chunk-XHM67O4N-D3pxE_Og.mjs} +1 -1
- package/dist/{chunk-XORM457F-CJbQLVgU.mjs → chunk-XORM457F-BuPOSqOe.mjs} +2 -2
- package/dist/{chunk-YCFVLTST-CKzPj8PR.mjs → chunk-YCFVLTST-DsF45PbT.mjs} +2 -2
- package/dist/{chunk-YFG2CMIF-DBRGs_rZ.mjs → chunk-YFG2CMIF-DjdwxBNc.mjs} +2 -2
- package/dist/{chunk-YNYSPYQ5-DHter9G3.mjs → chunk-YNYSPYQ5-gU4-j5DO.mjs} +1 -1
- package/dist/{chunk-YS3AZT3J-DwQ3GyQR.mjs → chunk-YS3AZT3J-CB0wWPLc.mjs} +2 -2
- package/dist/{chunk-YTNYSM6T-DcovOiF_.mjs → chunk-YTNYSM6T-DpkSVTln.mjs} +2 -2
- package/dist/{chunk-YZCP3GAM-CkC6DoBJ.mjs → chunk-YZCP3GAM-DRdMIQsB.mjs} +2 -2
- package/dist/{chunk-Z6LRHWXI-BLaYoFnT.mjs → chunk-Z6LRHWXI-EsbeaQ3V.mjs} +2 -2
- package/dist/{chunk-ZZ45TVLE-CXznFlWR.mjs → chunk-ZZ45TVLE-DwKS4e_N.mjs} +2 -2
- package/dist/classDiagram-6PBFFD2Q-BrpY9pLd.mjs +2 -0
- package/dist/classDiagram-v2-HSJHXN6E-DDV6mz7Y.mjs +2 -0
- package/dist/clear-5CZ5X4YR-CHSnzs8i.mjs +1 -0
- package/dist/cli.mjs +59 -71
- package/dist/clone-BD_JFVST.mjs +2 -0
- package/dist/column-WLPMMSTS-DTBoovzp.mjs +1 -0
- package/dist/comm-5SLSESQG-DT3SY7zS.mjs +1 -0
- package/dist/constants-ucUYJZ1d.mjs +2 -0
- package/dist/cp-XOYR4ABJ-Bs6Rpbb2.mjs +1 -0
- package/dist/{curl-47BFPSFW-ClMENMWY.mjs → curl-47BFPSFW-xgS5bDTx.mjs} +2 -2
- package/dist/cut-OPC3VAGB-Bm1HBn07.mjs +1 -0
- package/dist/{dagre-KV5264BT-C5SrnhX7.mjs → dagre-KV5264BT-Ci7CcQr4.mjs} +2 -2
- package/dist/{dagre-LJG-5J7U.mjs → dagre-L3rg9n9q.mjs} +2 -2
- package/dist/date-DD7FVA2V-Dv3os04S.mjs +1 -0
- package/dist/{diagram-5BDNPKRD-biBuhEzo.mjs → diagram-5BDNPKRD-BM3C88Zx.mjs} +2 -2
- package/dist/{diagram-G4DWMVQ6-CHhS5h96.mjs → diagram-G4DWMVQ6-Dt1Kt-mj.mjs} +2 -2
- package/dist/{diagram-MMDJMWI5-BgulNwvp.mjs → diagram-MMDJMWI5-DomPsk0L.mjs} +2 -2
- package/dist/{diagram-TYMM5635-DpmgERPD.mjs → diagram-TYMM5635-eOfCqwhs.mjs} +2 -2
- package/dist/diff-HJF2MPDN-Di-oK2tx.mjs +1 -0
- package/dist/dirname-LEMTZZFS-D-u8wJ0b.mjs +1 -0
- package/dist/{dist-DyW0okj3.mjs → dist-CwoT-vvz.mjs} +16 -16
- package/dist/{dist-H-OAf-7x.mjs → dist-tv3SH76A.mjs} +1 -1
- package/dist/du-WO2ENHXQ-CO_jR0w6.mjs +1 -0
- package/dist/echo-O45JWWI2-RBT2dq5Y.mjs +1 -0
- package/dist/env-5EPCWSXR-DSwwgRF5.mjs +1 -0
- package/dist/{erDiagram-SMLLAGMA-BNISHenz.mjs → erDiagram-SMLLAGMA-CPcwhEue.mjs} +2 -2
- package/dist/{esm-CsQUg9js.mjs → esm-BLMtE3s6.mjs} +1 -1
- package/dist/{esm-BQ4-CT8p.mjs → esm-BS2W3Uzl.mjs} +1 -1
- package/dist/expand-DTNXU4LQ-CtzV8vlq.mjs +1 -0
- package/dist/expansion-ENLSRCXJ-CNi8PTVy.mjs +1 -0
- package/dist/expr-5T3UU5KE-BOXtVHu2.mjs +1 -0
- package/dist/file-ZIGAJ4YS-Bt-1Wusv.mjs +1 -0
- package/dist/find-TPUOAIUQ-CJd25AiD.mjs +1 -0
- package/dist/{flag-coverage-QT4N2Z44-BlPYKPtd.mjs → flag-coverage-QT4N2Z44-hqAAghSo.mjs} +2 -2
- package/dist/{flowDiagram-DWJPFMVM-CFu645eN.mjs → flowDiagram-DWJPFMVM-WnIxEgSt.mjs} +2 -2
- package/dist/fold-LDSORVYE-DZ2L21IZ.mjs +1 -0
- package/dist/{ganttDiagram-T4ZO3ILL-DhKUbpmR.mjs → ganttDiagram-T4ZO3ILL-BJEuIZ2X.mjs} +2 -2
- package/dist/{getMachineId-bsd-DC8LkcdK.mjs → getMachineId-bsd-B7ue3N1o.mjs} +2 -2
- package/dist/{getMachineId-bsd-Bt-frlcx.mjs → getMachineId-bsd-DYQqYqxN.mjs} +2 -2
- package/dist/{getMachineId-bsd-DFsE-K5i.mjs → getMachineId-bsd-ucL-2FoT.mjs} +2 -2
- package/dist/{getMachineId-darwin-B9GQUU0e.mjs → getMachineId-darwin-BNCkZc-0.mjs} +2 -2
- package/dist/{getMachineId-darwin-DMNBrKWp.mjs → getMachineId-darwin-CSTYV_Bd.mjs} +2 -2
- package/dist/{getMachineId-darwin-DRxpszyZ.mjs → getMachineId-darwin-DWmBOUuk.mjs} +2 -2
- package/dist/{getMachineId-linux-D9dNX75P.mjs → getMachineId-linux-BaNp1ZEm.mjs} +2 -2
- package/dist/{getMachineId-linux-DOv7iOg-.mjs → getMachineId-linux-Bv6oOXxT.mjs} +2 -2
- package/dist/{getMachineId-linux-B5vQV4C7.mjs → getMachineId-linux-tTgUzx-Z.mjs} +2 -2
- package/dist/{getMachineId-unsupported-D6sWFm_K.mjs → getMachineId-unsupported-Kf9p6LJQ.mjs} +2 -2
- package/dist/{getMachineId-unsupported-DdAD6gRb.mjs → getMachineId-unsupported-fh_7WYkB.mjs} +2 -2
- package/dist/{getMachineId-unsupported-BQ6KY9w-.mjs → getMachineId-unsupported-iDvWGFBk.mjs} +2 -2
- package/dist/{getMachineId-win-BZsHRo32.mjs → getMachineId-win-Bo1_B38N.mjs} +2 -2
- package/dist/{getMachineId-win-CpDtoa22.mjs → getMachineId-win-DHmdubaR.mjs} +2 -2
- package/dist/{getMachineId-win-BMQSc3Xj.mjs → getMachineId-win-DQ2s9Z1n.mjs} +2 -2
- package/dist/{gh-detect-Ck0zE5NU.mjs → gh-detect-C_OoX4ZE.mjs} +3 -3
- package/dist/{git-handle-DY9lXoT3-CfssnuIB.mjs → git-handle-DY9lXoT3-Cmzgvwd8.mjs} +4 -4
- package/dist/git-handle-DdgvPBh6-Dv4DjLoy.mjs +1 -0
- package/dist/{gitGraphDiagram-UUTBAWPF-Cwemn6Ch.mjs → gitGraphDiagram-UUTBAWPF-BqA8KMTw.mjs} +2 -2
- package/dist/{graphlib-5CpUx0Yq.mjs → graphlib-BI4uS4Lx.mjs} +2 -2
- package/dist/grep-3AIAIJVR-CzG01gPs.mjs +1 -0
- package/dist/gzip-AQXSGOVS-B_BV2fa3.mjs +1 -0
- package/dist/head-HT2B6D2J-CjBr6WQ1.mjs +1 -0
- package/dist/help-VVWX7SA5-C4HsVKec.mjs +1 -0
- package/dist/history-J4QRNGRO-1CYG7cs0.mjs +1 -0
- package/dist/hostname-BK6HG2DE-BLS00ZWn.mjs +1 -0
- package/dist/html-to-markdown-TFCECAGV-5Fopg2Q5.mjs +1 -0
- package/dist/index.d.mts +1 -40
- package/dist/index.mjs +1 -1
- package/dist/{infoDiagram-42DDH7IO-D0XeM9Mm.mjs → infoDiagram-42DDH7IO-0lM1lRCH.mjs} +2 -2
- package/dist/init-BIZmMISx.mjs +317 -0
- package/dist/init-xOChjex1.mjs +1 -0
- package/dist/{ishikawaDiagram-UXIWVN3A-vTBTHzHj.mjs → ishikawaDiagram-UXIWVN3A-j-jlqjJX.mjs} +2 -2
- package/dist/join-GG2LDHE5-C_A2RnwJ.mjs +1 -0
- package/dist/{journeyDiagram-VCZTEJTY-Dq1fLo6N.mjs → journeyDiagram-VCZTEJTY-BDX_OcrR.mjs} +2 -2
- package/dist/jq-ODXZBPLY-hdWY1RUY.mjs +1 -0
- package/dist/{js-exec-M6UR76J5-ZESSNIAK.mjs → js-exec-M6UR76J5-Cu6NIWHE.mjs} +2 -2
- package/dist/{kanban-definition-6JOO6SKY-B03_bODj.mjs → kanban-definition-6JOO6SKY-C5XJUD3U.mjs} +2 -2
- package/dist/{katex-Bif7Db7V.mjs → katex-DEJL_MaU.mjs} +1 -1
- package/dist/{lib-CCQO9uWA.mjs → lib-CItGM3rN.mjs} +2 -2
- package/dist/{libesm-_Wi8iuGI.mjs → libesm-Ob3yvbRV.mjs} +1 -1
- package/dist/{line-C62ka-l9.mjs → line-C6RZPh4T.mjs} +2 -2
- package/dist/ln-4TRFBYAT-CMm4PFgi.mjs +1 -0
- package/dist/{loader-Z9weMUfL.mjs → loader-DV6UKiTv.mjs} +3 -3
- package/dist/loader-VmDsYETh.mjs +1 -0
- package/dist/ls-KSXFZCWH-Beyjypib.mjs +1 -0
- package/dist/{lzma-BSEvzrCT.mjs → lzma-DBkyKSY9.mjs} +2 -2
- package/dist/md5sum-INMIK4DX-C2RH1Ljb.mjs +1 -0
- package/dist/{mermaid.core-LrO0u_wA.mjs → mermaid.core-CcmmzbTt.mjs} +3 -3
- package/dist/{mindmap-definition-QFDTVHPH-b0aFdJAS.mjs → mindmap-definition-QFDTVHPH-WLdthwDy.mjs} +2 -2
- package/dist/mkdir-TDEMSB6C-BeLs_C7x.mjs +1 -0
- package/dist/mv-Z6MORUFL-BDAoI0Wd.mjs +1 -0
- package/dist/nl-U5YJDM32-SP99R3HJ.mjs +1 -0
- package/dist/od-VJEF2UR5-BR0Ho1t5.mjs +1 -0
- package/dist/paste-7N6AFSDS-Bz3kd4hU.mjs +1 -0
- package/dist/{pieDiagram-DEJITSTG-C77h8TOO.mjs → pieDiagram-DEJITSTG-7oeIAT-R.mjs} +2 -2
- package/dist/{preview-DlyUih8P.mjs → preview-CE-TkybR.mjs} +2 -2
- package/dist/preview-CvKvNwdB.mjs +1 -0
- package/dist/printf-CX64KX2P-GrZNCK4M.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-QvRIx_do.js → ActivityModeContent-CNxdYTCc.js} +1 -1
- package/dist/public/assets/{DocumentContext-zL3ZbwDo.js → DocumentContext-bNGvFuJS.js} +1 -1
- package/dist/public/assets/{GraphPanel-DiyMfzQg.js → GraphPanel-D5yxV_ez.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-OxkUY14x.js → ManagedArtifactProperties-CRYWYGK4.js} +1 -1
- package/dist/public/assets/McpConsentDialogBody-Dr_AIi2H.js +1 -0
- package/dist/public/assets/{PropertyPanel-D9A27c2E.js → PropertyPanel-DgbQo3wG.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-cotnwVMw.js → SettingsDialogBody-CU-nEwde.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-BsGotb40.js → SkillEditorActions-Bfh-iuK_.js} +1 -1
- package/dist/public/assets/{SourceEditor-BZ3cbLjs.js → SourceEditor-CAUoNOTU.js} +1 -1
- package/dist/public/assets/{TerminalPanel-XlICQw5o.js → TerminalPanel-Ds-ev2-D.js} +1 -1
- package/dist/public/assets/{config-validation-events-yB2QWKKJ.js → config-validation-events-DiOTHiAz.js} +1 -1
- package/dist/public/assets/{dist-BRGUidv4.js → dist-GmorMgHF.js} +6 -8
- package/dist/public/assets/{documents-events-DA8Q5ICz.js → documents-events-CSQluyCM.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CP3Xa3us.js → file-tree-adapter-TDYabCI-.js} +1 -1
- package/dist/public/assets/{index-CzFOYplh.js → index-BeB8EEj0.js} +93 -93
- package/dist/public/assets/index-hY8weMMg.css +1 -0
- package/dist/public/assets/{keyboard-shortcuts-DOkzBlgc.js → keyboard-shortcuts-CZysvuV8.js} +1 -1
- package/dist/public/assets/{navigation-targets-DNRja8Z0.js → navigation-targets-CXdtVjj4.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DBkxdYp_.js → open-managed-artifact-tab-CvsZjaW-.js} +1 -1
- package/dist/public/assets/{prop-types-C-aZftyS.js → prop-types-C_2IQGCC.js} +1 -1
- package/dist/public/assets/{selection-context-vh0MmCBb.js → selection-context-B6kAEK37.js} +1 -1
- package/dist/public/assets/{skill-actions-Sc4IN52j.js → skill-actions-CPoGr_7b.js} +1 -1
- package/dist/public/assets/{skills-api-ts3L80AV.js → skills-api-mcV6MiPo.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CIKQ1Hj-.js → target-navigation-intent-C4nLupIH.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BT98lJOb.js → typing-burst-detector-DEl5qeGr.js} +1 -1
- package/dist/public/index.html +17 -17
- package/dist/pwd-D4OZ7N27-DDRhZsId.mjs +1 -0
- package/dist/{python3-AUFTPCU6-B7_jrPM3.mjs → python3-AUFTPCU6-DmPp1QHj.mjs} +2 -2
- package/dist/{quadrantDiagram-34T5L4WZ-CLL-GTlz.mjs → quadrantDiagram-34T5L4WZ-DWVBhb1E.mjs} +2 -2
- package/dist/readlink-MI4GCHJF-mNeJ3km7.mjs +1 -0
- package/dist/{repair-launch-json-DgKo_ct3.mjs → repair-launch-json-sjB6vbft.mjs} +2 -2
- package/dist/repair-mcp-configs-uo7Kpg-f.mjs +2 -0
- package/dist/repair-skills-8Fp4JWM2.mjs +1 -0
- package/dist/repair-skills-qae9fkzx.mjs +3 -0
- package/dist/{requirementDiagram-MS252O5E-JIzm76n0.mjs → requirementDiagram-MS252O5E-Bneel37I.mjs} +2 -2
- package/dist/rev-XOSYPP45-KAKdorsx.mjs +1 -0
- package/dist/rg-FOQSCCX3-BWOdKDEd.mjs +1 -0
- package/dist/rm-RTZG23RL-D4Xj3X_m.mjs +1 -0
- package/dist/rmdir-XTQXT7RK-Bx-u3U5l.mjs +1 -0
- package/dist/{sankeyDiagram-XADWPNL6-Bpk8eTPe.mjs → sankeyDiagram-XADWPNL6-4f2f9-uf.mjs} +2 -2
- package/dist/sed-VFTTATXJ-DmL_7Y-J.mjs +1 -0
- package/dist/seq-RN5ZUASB-DeaNEJEM.mjs +1 -0
- package/dist/{sequenceDiagram-FGHM5R23-CHCigzvZ.mjs → sequenceDiagram-FGHM5R23-B1K4VtLp.mjs} +2 -2
- package/dist/server-lock-8Lv6A-Xa-COMNAqoW.mjs +1 -0
- package/dist/{server-lock-CN2YHwpP-BYuwTc93.mjs → server-lock-CN2YHwpP-CIPpd1-K.mjs} +73 -73
- package/dist/sha1sum-VJPNLNU6-DYUNX0rt.mjs +1 -0
- package/dist/sha256sum-PI32XWXY-BwDMGEnF.mjs +1 -0
- package/dist/sleep-VZFPZFWA-D3IG7CwN.mjs +1 -0
- package/dist/sort-DCNRDA7U-BfL8J8kf.mjs +1 -0
- package/dist/split-SITCSYCZ-Q5NIWguo.mjs +1 -0
- package/dist/sqlite3-56UMWEY3-DA8bw7DG.mjs +1 -0
- package/dist/src-CYYkqMBK.mjs +3 -0
- package/dist/start-C9zxsQBV.mjs +3 -0
- package/dist/start-dIUzLkmt.mjs +1 -0
- package/dist/stat-BT5A227F-CYFqsI8W.mjs +1 -0
- package/dist/{stateDiagram-FHFEXIEX-CiIJxbDV.mjs → stateDiagram-FHFEXIEX-BREbMXiC.mjs} +2 -2
- package/dist/stateDiagram-v2-QKLJ7IA2-DQeH2s3K.mjs +2 -0
- package/dist/strings-7PLOGTPD-BLW4mXRs.mjs +1 -0
- package/dist/tac-SJGXQ4T2-BGR2Dq7O.mjs +1 -0
- package/dist/tail-S5ULNTJU-BOBd42y5.mjs +1 -0
- package/dist/tar-ANUBEFJY-DCUS8bvA.mjs +1 -0
- package/dist/tee-O7VXZDCO-Bg8MXC_K.mjs +1 -0
- package/dist/time-DEUO3QV2-CxVP9vXG.mjs +1 -0
- package/dist/{timeline-definition-GMOUNBTQ-BBhlpYO9.mjs → timeline-definition-GMOUNBTQ-Bd7XEw7o.mjs} +2 -2
- package/dist/timeout-VRKMCG72-CVG2Q30a.mjs +1 -0
- package/dist/touch-DX2IJOQ4-DmEja_Fu.mjs +1 -0
- package/dist/tr-2HXZRDSW-DWcyuCoi.mjs +1 -0
- package/dist/tree-LYXBS7DC-CFaeUWGI.mjs +1 -0
- package/dist/true-WHJNXCHG-CJH22fVg.mjs +1 -0
- package/dist/unexpand-RGTMIGZM-Uj1QzdPV.mjs +1 -0
- package/dist/uniq-SUNANL47-MRCnRrGo.mjs +1 -0
- package/dist/{vennDiagram-DHZGUBPP-CATweP9B.mjs → vennDiagram-DHZGUBPP-Bk-INjRY.mjs} +2 -2
- package/dist/{wardleyDiagram-NUSXRM2D-3qxY3I6a.mjs → wardleyDiagram-NUSXRM2D-DOD6wQla.mjs} +2 -2
- package/dist/wc-TQB3VNOX-JPk1lni-.mjs +1 -0
- package/dist/which-XZHEH76L-Cl63MOrV.mjs +1 -0
- package/dist/whoami-DGKU3D2X-CB3itqHE.mjs +1 -0
- package/dist/{wrapper-CGw3ogaz.mjs → wrapper-BZO_sIci.mjs} +1 -1
- package/dist/write-project-skill-Ta2BaP1w.mjs +12 -0
- package/dist/xan-BXDXYEIB-ZPqGVO90.mjs +1 -0
- package/dist/xan-view-ECQUO7AJ-C-WHEJiv.mjs +1 -0
- package/dist/xargs-I6EZUCYF-BvcSF5Y7.mjs +1 -0
- package/dist/{xychartDiagram-5P7HB3ND-BAWpa2N2.mjs → xychartDiagram-5P7HB3ND-B4AGYFQs.mjs} +2 -2
- package/dist/yazl-CQSNnbvt.mjs +1 -0
- package/dist/{yazl-DgCFuIuD.mjs → yazl-Docqgl6q.mjs} +1 -1
- package/dist/yq-MJMAR36V-_D_zdU3z.mjs +1 -0
- package/package.json +1 -1
- package/dist/alias-JE7RI5QX-DxvTrQH3.mjs +0 -1
- package/dist/awk2-POPGKRAI-6Q9HKhoL.mjs +0 -1
- package/dist/base64-4YMZCVJ5-bqN_UBX0.mjs +0 -1
- package/dist/basename-AA2KJYZQ-GWPOMupJ.mjs +0 -1
- package/dist/bash-IJWYRKFO-C7Yi9aK0.mjs +0 -1
- package/dist/build-gfyDk62R.mjs +0 -1
- package/dist/cat-RDUMLXKC-Cqi4_PjZ.mjs +0 -1
- package/dist/channel-Dq8ADXfq.mjs +0 -2
- package/dist/chmod-SYMGL4JA-C_dD-tNl.mjs +0 -1
- package/dist/classDiagram-6PBFFD2Q-cIblqhKe.mjs +0 -2
- package/dist/classDiagram-v2-HSJHXN6E-CnZ_g-6O.mjs +0 -2
- package/dist/clear-5CZ5X4YR-C4DTv-gF.mjs +0 -1
- package/dist/clone-s6xjJkoz.mjs +0 -2
- package/dist/column-WLPMMSTS-Bg1ZsVDm.mjs +0 -1
- package/dist/comm-5SLSESQG-CTh1BUfn.mjs +0 -1
- package/dist/constants-m4f9Gwpu.mjs +0 -2
- package/dist/cp-XOYR4ABJ-VqiK1WcH.mjs +0 -1
- package/dist/cut-OPC3VAGB-BDAM8WY8.mjs +0 -1
- package/dist/date-DD7FVA2V-nDqDn5ZQ.mjs +0 -1
- package/dist/diff-HJF2MPDN-DSY9AfjL.mjs +0 -1
- package/dist/dirname-LEMTZZFS-VsUIxZwx.mjs +0 -1
- package/dist/du-WO2ENHXQ-Cq3dzRFU.mjs +0 -1
- package/dist/echo-O45JWWI2-B99ElfBo.mjs +0 -1
- package/dist/env-5EPCWSXR-CsaomJHQ.mjs +0 -1
- package/dist/expand-DTNXU4LQ-Bp3M0RnL.mjs +0 -1
- package/dist/expansion-ENLSRCXJ-C5xjxYTl.mjs +0 -1
- package/dist/expr-5T3UU5KE-DrJUreFq.mjs +0 -1
- package/dist/file-ZIGAJ4YS-D07ChhI1.mjs +0 -1
- package/dist/find-TPUOAIUQ-ZPOxwUwf.mjs +0 -1
- package/dist/fold-LDSORVYE-Bx5XDGgK.mjs +0 -1
- package/dist/git-handle-DdgvPBh6-C80s8fFN.mjs +0 -1
- package/dist/grep-3AIAIJVR-Bh6KBg6d.mjs +0 -1
- package/dist/gzip-AQXSGOVS-BtiMTiZG.mjs +0 -1
- package/dist/head-HT2B6D2J-DSAed845.mjs +0 -1
- package/dist/help-VVWX7SA5-DCBusWam.mjs +0 -1
- package/dist/history-J4QRNGRO-BwBOMO5i.mjs +0 -1
- package/dist/hostname-BK6HG2DE-_qJ9gN13.mjs +0 -1
- package/dist/html-to-markdown-TFCECAGV-D7XdAo13.mjs +0 -1
- package/dist/init-BbVUxVGS.mjs +0 -321
- package/dist/init-Cxp98ROz.mjs +0 -1
- package/dist/join-GG2LDHE5-BMnXfCXQ.mjs +0 -1
- package/dist/jq-ODXZBPLY-D3tmTL1R.mjs +0 -1
- package/dist/ln-4TRFBYAT-Byit-TLI.mjs +0 -1
- package/dist/loader-UdRFiBKU.mjs +0 -1
- package/dist/ls-KSXFZCWH-CNZ_hN8P.mjs +0 -1
- package/dist/md5sum-INMIK4DX-pTX2tfQd.mjs +0 -1
- package/dist/mkdir-TDEMSB6C-Bl16kSBR.mjs +0 -1
- package/dist/mv-Z6MORUFL-D9pw6nb9.mjs +0 -1
- package/dist/nl-U5YJDM32-Bs_nMrMg.mjs +0 -1
- package/dist/od-VJEF2UR5-DwpkPMHp.mjs +0 -1
- package/dist/paste-7N6AFSDS-C8EyimeA.mjs +0 -1
- package/dist/preview-BUIvO8U0.mjs +0 -1
- package/dist/printf-CX64KX2P-2Mks7IIT.mjs +0 -1
- package/dist/public/assets/McpConsentDialogBody-ByCv3Eox.js +0 -1
- package/dist/public/assets/index-CG7gf_6X.css +0 -1
- package/dist/pwd-D4OZ7N27-m5fzqroZ.mjs +0 -1
- package/dist/readlink-MI4GCHJF-BMheCA1U.mjs +0 -1
- package/dist/repair-mcp-configs-DUZFjiWh.mjs +0 -2
- package/dist/repair-skills-BGQinwio.mjs +0 -3
- package/dist/repair-skills-BQP8U0AN.mjs +0 -1
- package/dist/rev-XOSYPP45-4azlKYu4.mjs +0 -1
- package/dist/rg-FOQSCCX3-ViKChHv5.mjs +0 -1
- package/dist/rm-RTZG23RL-F9g7gQHU.mjs +0 -1
- package/dist/rmdir-XTQXT7RK-CFMuhNvO.mjs +0 -1
- package/dist/sed-VFTTATXJ-BfHBQ11q.mjs +0 -1
- package/dist/seq-RN5ZUASB-BaUQfYSh.mjs +0 -1
- package/dist/server-lock-8Lv6A-Xa-xTK-ENFB.mjs +0 -1
- package/dist/sha1sum-VJPNLNU6-NRAU83Yg.mjs +0 -1
- package/dist/sha256sum-PI32XWXY-Cfe-w5CY.mjs +0 -1
- package/dist/sleep-VZFPZFWA-BgSOeH2N.mjs +0 -1
- package/dist/sort-DCNRDA7U-DqMg1dll.mjs +0 -1
- package/dist/split-SITCSYCZ-DqhMcIGL.mjs +0 -1
- package/dist/sqlite3-56UMWEY3-DNmhrHQv.mjs +0 -1
- package/dist/src-B8E2dBvX.mjs +0 -3
- package/dist/start-BbTUyYTc.mjs +0 -3
- package/dist/start-BoQjiYiU.mjs +0 -1
- package/dist/stat-BT5A227F-DOG39Ce5.mjs +0 -1
- package/dist/stateDiagram-v2-QKLJ7IA2-CTdt2FVd.mjs +0 -2
- package/dist/strings-7PLOGTPD-l9kho9ff.mjs +0 -1
- package/dist/tac-SJGXQ4T2-DMDGVNTy.mjs +0 -1
- package/dist/tail-S5ULNTJU-knoYRbXD.mjs +0 -1
- package/dist/tar-ANUBEFJY-Db9qg5B2.mjs +0 -1
- package/dist/tee-O7VXZDCO-BgHEibOy.mjs +0 -1
- package/dist/time-DEUO3QV2-CXWA3kJ0.mjs +0 -1
- package/dist/timeout-VRKMCG72-aaC7r4sX.mjs +0 -1
- package/dist/touch-DX2IJOQ4-DGiKr2c0.mjs +0 -1
- package/dist/tr-2HXZRDSW-BDNDgux2.mjs +0 -1
- package/dist/tree-LYXBS7DC-BK2c44-E.mjs +0 -1
- package/dist/true-WHJNXCHG-B6CZ-ZF1.mjs +0 -1
- package/dist/unexpand-RGTMIGZM-BWFllY1p.mjs +0 -1
- package/dist/uniq-SUNANL47-CiXMC2Qh.mjs +0 -1
- package/dist/wc-TQB3VNOX-Bof613yN.mjs +0 -1
- package/dist/which-XZHEH76L-DfnqWxtA.mjs +0 -1
- package/dist/whoami-DGKU3D2X-DhtD1OhF.mjs +0 -1
- package/dist/write-project-skill-DzjtpVMW.mjs +0 -36
- package/dist/xan-BXDXYEIB-I8yansvE.mjs +0 -1
- package/dist/xan-view-ECQUO7AJ-DJhdCPf3.mjs +0 -1
- package/dist/xargs-I6EZUCYF-CdKFilDT.mjs +0 -1
- package/dist/yazl-Clfc09F-.mjs +0 -1
- package/dist/yq-MJMAR36V-BXyMiYfX.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e}from"./chunk-DXB73IDG-
|
|
1
|
+
import{a as e}from"./chunk-DXB73IDG-F_tmy-Lz.mjs";import{t}from"./chunk-SYMJJMQ4-jdmKoBFb.mjs";var n=e(t(),1);function r(){return Object.create(null)}function i(e,t,n){e[t]=n}function a(e){let t=r();for(let n of Object.keys(e)){let r=e[n];(typeof r==`string`||typeof r==`number`||typeof r==`boolean`||r===null)&&(t[n]=r)}return t}function o(e){let t=n.default.parse(e.trim(),{header:!0,dynamicTyping:!0,skipEmptyLines:!0}),r=t.data.map(e=>a(e));return{headers:t.meta.fields||[],data:r}}function s(e,t){return t.length===0?`${e.join(`,`)}
|
|
2
2
|
`:`${n.default.unparse(t,{columns:e}).replace(/\r\n/g,`
|
|
3
3
|
`)}
|
|
4
4
|
`}async function c(e,t){let n=e.find(e=>!e.startsWith(`-`)),r;if(!n||n===`-`)r=t.stdin;else try{let e=t.fs.resolvePath(t.cwd,n);r=await t.fs.readFile(e)}catch{return{headers:[],data:[],error:{stdout:``,stderr:`xan: ${n}: No such file or directory
|
|
@@ -7,4 +7,4 @@ import{a as e}from"./chunk-DXB73IDG-Bx-Ikbnu.mjs";import{t}from"./chunk-SYMJJMQ4
|
|
|
7
7
|
`,stderr:``,exitCode:0}}async function u(e,t){let n=0,r=[];for(let t=0;t<e.length;t++){let i=e[t];i===`-n`&&t+1<e.length?n=Number.parseInt(e[++t],10):i.startsWith(`-`)||r.push(i)}let{headers:i,data:a,error:o}=await c(r,t);if(o)return o;let s=n>0?a.slice(0,n):a,l=i.map(e=>e.length);for(let e of s)for(let t=0;t<i.length;t++){let n=String(e[i[t]]??``);l[t]=Math.max(l[t],n.length)}let u=[];u.push(`\u250C${l.map(e=>`─`.repeat(e+2)).join(`┬`)}\u2510`);let d=i.map((e,t)=>` ${e.padEnd(l[t])} `).join(`│`);u.push(`│${d}│`),u.push(`\u251C${l.map(e=>`─`.repeat(e+2)).join(`┼`)}\u2524`);for(let e of s){let t=i.map((t,n)=>` ${String(e[t]??``).padEnd(l[n])} `).join(`│`);u.push(`│${t}│`)}return u.push(`\u2514${l.map(e=>`─`.repeat(e+2)).join(`┴`)}\u2518`),{stdout:`${u.join(`
|
|
8
8
|
`)}
|
|
9
9
|
`,stderr:``,exitCode:0}}export{o as a,u as c,l as i,s as n,c as o,i as r,r as s,a as t};
|
|
10
|
-
//# sourceMappingURL=chunk-F55TLFGB-
|
|
10
|
+
//# sourceMappingURL=chunk-F55TLFGB-BZSRX-Vi.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./chunk-YNYSPYQ5-
|
|
1
|
+
import{t as e}from"./chunk-YNYSPYQ5-gU4-j5DO.mjs";import{c as t,d as n,f as r,h as i,i as a,o,u as s}from"./chunk-GFQRA5P5-DbAN9IDm.mjs";function c(e,t){for(;t<e.length;){if(e[t]===`\\`&&e[t+1]===`
|
|
2
2
|
`){t+=2;continue}if(/\s/.test(e[t])){t++;continue}break}return t}var l=[`=`,`+=`,`-=`,`*=`,`/=`,`%=`,`<<=`,`>>=`,`&=`,`|=`,`^=`];function u(e){if(e.includes(`#`)){let[t,n]=e.split(`#`),r=Number.parseInt(t,10);if(r<2||r>64)return NaN;if(r<=36){let e=Number.parseInt(n,r);return e>2**53-1?2**53-1:e}let i=0;for(let e of n){let t;if(/[0-9]/.test(e))t=e.charCodeAt(0)-48;else if(/[a-z]/.test(e))t=e.charCodeAt(0)-97+10;else if(/[A-Z]/.test(e))t=e.charCodeAt(0)-65+36;else if(e===`@`)t=62;else if(e===`_`)t=63;else return NaN;if(t>=r)return NaN;if(i=i*r+t,i>2**53-1)return 2**53-1}return i}if(e.startsWith(`0x`)||e.startsWith(`0X`)){let t=Number.parseInt(e.slice(2),16);return t>2**53-1?2**53-1:t}if(e.startsWith(`0`)&&e.length>1&&/^[0-9]+$/.test(e)){if(/[89]/.test(e))return NaN;let t=Number.parseInt(e,8);return t>2**53-1?2**53-1:t}let t=Number.parseInt(e,10);return t>2**53-1?2**53-1:t}function d(e,t,n,r){if(n.slice(r,r+3)!==`$((`)return null;let i=r+3,a=1,o=i;for(;i<n.length-1&&a>0;)n[i]===`(`&&n[i+1]===`(`?(a++,i+=2):n[i]===`)`&&n[i+1]===`)`?(a--,a>0&&(i+=2)):i++;let{expr:s}=e(t,n.slice(o,i),0);return i+=2,{expr:{type:`ArithNested`,expression:s},pos:i}}function f(e,t){if(e.slice(t,t+2)!==`$'`)return null;let n=t+2,r=``;for(;n<e.length&&e[n]!==`'`;)if(e[n]===`\\`&&n+1<e.length){let t=e[n+1];switch(t){case`n`:r+=`
|
|
3
3
|
`;break;case`t`:r+=` `;break;case`r`:r+=`\r`;break;case`\\`:r+=`\\`;break;case`'`:r+=`'`;break;default:r+=t}n+=2}else r+=e[n],n++;e[n]===`'`&&n++;let i=Number.parseInt(r,10);return{expr:{type:`ArithNumber`,value:Number.isNaN(i)?0:i},pos:n}}function p(e,t){if(e.slice(t,t+2)!==`$"`)return null;let n=t+2,r=``;for(;n<e.length&&e[n]!==`"`;)e[n]===`\\`&&n+1<e.length?(r+=e[n+1],n+=2):(r+=e[n],n++);e[n]===`"`&&n++;let i=Number.parseInt(r,10);return{expr:{type:`ArithNumber`,value:Number.isNaN(i)?0:i},pos:n}}function m(e){let t=``,n=0;for(;n<e.length;)if(e[n]===`"`){for(n++;n<e.length&&e[n]!==`"`;)e[n]===`\\`&&n+1<e.length?(t+=e[n+1],n+=2):(t+=e[n],n++);n<e.length&&n++}else t+=e[n],n++;return t}function h(e,t){let n=m(t),{expr:r,pos:i}=v(e,n,0),a=c(n,i);if(a<n.length){let e=t.slice(a).trim();if(e)return{type:`ArithmeticExpression`,originalText:t,expression:{type:`ArithSyntaxError`,errorToken:e,message:`${e}: syntax error: invalid arithmetic operator (error token is "${e}")`}}}return{type:`ArithmeticExpression`,expression:r,originalText:t}}function g(e,t){return{expr:{type:`ArithSyntaxError`,errorToken:e,message:`syntax error: operand expected (error token is "${e}")`},pos:t}}function _(e,t){return c(e,t)>=e.length}function v(e,t,n){return ee(e,t,n)}function ee(e,t,n){let{expr:r,pos:i}=y(e,t,n);for(i=c(t,i);t[i]===`,`;){if(i++,_(t,i))return g(`,`,i);let{expr:n,pos:a}=y(e,t,i);r={type:`ArithBinary`,operator:`,`,left:r,right:n},i=c(t,a)}return{expr:r,pos:i}}function y(e,t,n){let{expr:r,pos:i}=te(e,t,n);if(i=c(t,i),t[i]===`?`){i++;let{expr:n,pos:a}=v(e,t,i);if(i=c(t,a),t[i]===`:`){i++;let{expr:a,pos:o}=v(e,t,i);return{expr:{type:`ArithTernary`,condition:r,consequent:n,alternate:a},pos:o}}}return{expr:r,pos:i}}function te(e,t,n){let{expr:r,pos:i}=ne(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`||`;){if(i+=2,_(t,i))return g(`||`,i);let{expr:n,pos:a}=ne(e,t,i);r={type:`ArithBinary`,operator:`||`,left:r,right:n},i=a}return{expr:r,pos:i}}function ne(e,t,n){let{expr:r,pos:i}=re(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`&&`;){if(i+=2,_(t,i))return g(`&&`,i);let{expr:n,pos:a}=re(e,t,i);r={type:`ArithBinary`,operator:`&&`,left:r,right:n},i=a}return{expr:r,pos:i}}function re(e,t,n){let{expr:r,pos:i}=ie(e,t,n);for(;i=c(t,i),t[i]===`|`&&t[i+1]!==`|`;){if(i++,_(t,i))return g(`|`,i);let{expr:n,pos:a}=ie(e,t,i);r={type:`ArithBinary`,operator:`|`,left:r,right:n},i=a}return{expr:r,pos:i}}function ie(e,t,n){let{expr:r,pos:i}=ae(e,t,n);for(;i=c(t,i),t[i]===`^`;){if(i++,_(t,i))return g(`^`,i);let{expr:n,pos:a}=ae(e,t,i);r={type:`ArithBinary`,operator:`^`,left:r,right:n},i=a}return{expr:r,pos:i}}function ae(e,t,n){let{expr:r,pos:i}=oe(e,t,n);for(;i=c(t,i),t[i]===`&`&&t[i+1]!==`&`;){if(i++,_(t,i))return g(`&`,i);let{expr:n,pos:a}=oe(e,t,i);r={type:`ArithBinary`,operator:`&`,left:r,right:n},i=a}return{expr:r,pos:i}}function oe(e,t,n){let{expr:r,pos:i}=se(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`==`||t.slice(i,i+2)===`!=`;){let n=t.slice(i,i+2);if(i+=2,_(t,i))return g(n,i);let{expr:a,pos:o}=se(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}return{expr:r,pos:i}}function se(e,t,n){let{expr:r,pos:i}=ce(e,t,n);for(;;)if(i=c(t,i),t.slice(i,i+2)===`<=`||t.slice(i,i+2)===`>=`){let n=t.slice(i,i+2);if(i+=2,_(t,i))return g(n,i);let{expr:a,pos:o}=ce(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}else if(t[i]===`<`||t[i]===`>`){let n=t[i];if(i++,_(t,i))return g(n,i);let{expr:a,pos:o}=ce(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}else break;return{expr:r,pos:i}}function ce(e,t,n){let{expr:r,pos:i}=le(e,t,n);for(;i=c(t,i),t.slice(i,i+2)===`<<`||t.slice(i,i+2)===`>>`;){let n=t.slice(i,i+2);if(i+=2,_(t,i))return g(n,i);let{expr:a,pos:o}=le(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}return{expr:r,pos:i}}function le(e,t,n){let{expr:r,pos:i}=ue(e,t,n);for(;i=c(t,i),(t[i]===`+`||t[i]===`-`)&&t[i+1]!==t[i];){let n=t[i];if(i++,_(t,i))return g(n,i);let{expr:a,pos:o}=ue(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}return{expr:r,pos:i}}function ue(e,t,n){let{expr:r,pos:i}=de(e,t,n);for(;;)if(i=c(t,i),t[i]===`*`&&t[i+1]!==`*`){if(i++,_(t,i))return g(`*`,i);let{expr:n,pos:a}=de(e,t,i);r={type:`ArithBinary`,operator:`*`,left:r,right:n},i=a}else if(t[i]===`/`||t[i]===`%`){let n=t[i];if(i++,_(t,i))return g(n,i);let{expr:a,pos:o}=de(e,t,i);r={type:`ArithBinary`,operator:n,left:r,right:a},i=o}else break;return{expr:r,pos:i}}function de(e,t,n){let{expr:r,pos:i}=fe(e,t,n),a=c(t,i);if(t.slice(a,a+2)===`**`){if(a+=2,_(t,a))return g(`**`,a);let{expr:n,pos:i}=de(e,t,a);return{expr:{type:`ArithBinary`,operator:`**`,left:r,right:n},pos:i}}return{expr:r,pos:i}}function fe(e,t,n){let r=c(t,n);if(t.slice(r,r+2)===`++`||t.slice(r,r+2)===`--`){let n=t.slice(r,r+2);r+=2;let{expr:i,pos:a}=fe(e,t,r);return{expr:{type:`ArithUnary`,operator:n,operand:i,prefix:!0},pos:a}}if(t[r]===`+`||t[r]===`-`||t[r]===`!`||t[r]===`~`){let n=t[r];r++;let{expr:i,pos:a}=fe(e,t,r);return{expr:{type:`ArithUnary`,operator:n,operand:i,prefix:!0},pos:a}}return me(e,t,r)}function pe(e,t){let n=e[t];return n===`$`||n==="`"}function me(e,t,n){let{expr:r,pos:i}=he(e,t,n,!1),a=[r];for(;pe(t,i);){let{expr:n,pos:r}=he(e,t,i,!0);a.push(n),i=r}a.length>1&&(r={type:`ArithConcat`,parts:a});let o;if(t[i]===`[`&&r.type===`ArithConcat`){i++;let{expr:n,pos:r}=v(e,t,i);o=n,i=r,t[i]===`]`&&i++}if(o&&r.type===`ArithConcat`&&(r={type:`ArithDynamicElement`,nameExpr:r,subscript:o},o=void 0),i=c(t,i),r.type===`ArithConcat`||r.type===`ArithVariable`||r.type===`ArithDynamicElement`){for(let n of l)if(t.slice(i,i+n.length)===n&&t.slice(i,i+n.length+1)!==`==`){i+=n.length;let{expr:a,pos:o}=y(e,t,i);return r.type===`ArithDynamicElement`?{expr:{type:`ArithDynamicAssignment`,operator:n,target:r.nameExpr,subscript:r.subscript,value:a},pos:o}:r.type===`ArithConcat`?{expr:{type:`ArithDynamicAssignment`,operator:n,target:r,value:a},pos:o}:{expr:{type:`ArithAssignment`,operator:n,variable:r.name,value:a},pos:o}}}if(t.slice(i,i+2)===`++`||t.slice(i,i+2)===`--`){let e=t.slice(i,i+2);return i+=2,{expr:{type:`ArithUnary`,operator:e,operand:r,prefix:!1},pos:i}}return{expr:r,pos:i}}function he(e,t,n,i=!1){let a=c(t,n),o=d(v,e,t,a);if(o)return o;let s=f(t,a);if(s)return s;let m=p(t,a);if(m)return m;if(t.slice(a,a+2)===`$(`&&t[a+2]!==`(`){a+=2;let e=1,n=a;for(;a<t.length&&e>0;)t[a]===`(`?e++:t[a]===`)`&&e--,e>0&&a++;let r=t.slice(n,a);return a++,{expr:{type:`ArithCommandSubst`,command:r},pos:a}}if(t[a]==="`"){a++;let e=a;for(;a<t.length&&t[a]!=="`";)a++;let n=t.slice(e,a);return t[a]==="`"&&a++,{expr:{type:`ArithCommandSubst`,command:n},pos:a}}if(t[a]===`(`){a++;let{expr:n,pos:r}=v(e,t,a);return a=c(t,r),t[a]===`)`&&a++,{expr:{type:`ArithGroup`,expression:n},pos:a}}if(t[a]===`'`){a++;let e=``;for(;a<t.length&&t[a]!==`'`;)e+=t[a],a++;t[a]===`'`&&a++;let n=Number.parseInt(e,10);return{expr:{type:`ArithSingleQuote`,content:e,value:Number.isNaN(n)?0:n},pos:a}}if(t[a]===`"`){a++;let n=``;for(;a<t.length&&t[a]!==`"`;)t[a]===`\\`&&a+1<t.length?(n+=t[a+1],a+=2):(n+=t[a],a++);t[a]===`"`&&a++;let r=n.trim();if(!r)return{expr:{type:`ArithNumber`,value:0},pos:a};let{expr:i}=v(e,r,0);return{expr:i,pos:a}}if(/[0-9]/.test(t[a])){let e=``,n=!1,i=!1;for(;a<t.length;){let r=t[a];if(n)if(/[0-9a-zA-Z@_]/.test(r))e+=r,a++;else break;else if(r===`#`)n=!0,e+=r,a++;else if(e===`0`&&(r===`x`||r===`X`)&&a+1<t.length&&/[0-9a-fA-F]/.test(t[a+1]))i=!0,e+=r,a++;else if(i&&/[0-9a-fA-F]/.test(r))e+=r,a++;else if(!i&&/[0-9]/.test(r))e+=r,a++;else break}if(a<t.length&&/[a-zA-Z_]/.test(t[a])){let n=e;for(;a<t.length&&/[a-zA-Z0-9_]/.test(t[a]);)n+=t[a],a++;return{expr:{type:`ArithSyntaxError`,errorToken:n,message:`${n}: value too great for base (error token is "${n}")`},pos:a}}if(t[a]===`.`&&/[0-9]/.test(t[a+1]))throw new r(`${e}.${t[a+1]}...: syntax error: invalid arithmetic operator`);if(t[a]===`[`){let n=t.slice(a).trim();return{expr:{type:`ArithNumberSubscript`,number:e,errorToken:n},pos:t.length}}return{expr:{type:`ArithNumber`,value:u(e)},pos:a}}if(t[a]===`$`&&t[a+1]===`{`){let e=a+2,n=1,r=e;for(;r<t.length&&n>0;)t[r]===`{`?n++:t[r]===`}`&&n--,n>0&&r++;let i=t.slice(e,r),o=r+1;if(t[o]===`#`){let e=o+1;for(;e<t.length&&/[0-9a-zA-Z@_]/.test(t[e]);)e++;return{expr:{type:`ArithDynamicBase`,baseExpr:i,value:t.slice(o+1,e)},pos:e}}if(/[0-9]/.test(t[o])||t[o]===`x`||t[o]===`X`){let e=o;if(t[o]===`x`||t[o]===`X`)for(e++;e<t.length&&/[0-9a-fA-F]/.test(t[e]);)e++;else for(;e<t.length&&/[0-9]/.test(t[e]);)e++;return{expr:{type:`ArithDynamicNumber`,prefix:i,suffix:t.slice(o,e)},pos:e}}return a=o,{expr:{type:`ArithBracedExpansion`,content:i},pos:a}}if(t[a]===`$`&&a+1<t.length&&/[0-9]/.test(t[a+1])){a++;let e=``;for(;a<t.length&&/[0-9]/.test(t[a]);)e+=t[a],a++;return{expr:{type:`ArithVariable`,name:e,hasDollarPrefix:!0},pos:a}}if(t[a]===`$`&&a+1<t.length&&/[*@#?\-!$]/.test(t[a+1])){let e=t[a+1];return a+=2,{expr:{type:`ArithSpecialVar`,name:e},pos:a}}let h=!1;if(t[a]===`$`&&a+1<t.length&&/[a-zA-Z_]/.test(t[a+1])&&(h=!0,a++),a<t.length&&/[a-zA-Z_]/.test(t[a])){let n=``;for(;a<t.length&&/[a-zA-Z0-9_]/.test(t[a]);)n+=t[a],a++;if(t[a]===`[`&&!i){a++;let r;if(t[a]===`'`||t[a]===`"`){let e=t[a];for(a++,r=``;a<t.length&&t[a]!==e;)r+=t[a],a++;t[a]===e&&a++,a=c(t,a),t[a]===`]`&&a++}let o;if(r===void 0){let{expr:n,pos:r}=v(e,t,a);o=n,a=r,t[a]===`]`&&a++}if(a=c(t,a),t[a]===`[`&&o)return{expr:{type:`ArithDoubleSubscript`,array:n,index:o},pos:a};if(!i){for(let i of l)if(t.slice(a,a+i.length)===i&&t.slice(a,a+i.length+1)!==`==`){a+=i.length;let{expr:s,pos:c}=y(e,t,a);return{expr:{type:`ArithAssignment`,operator:i,variable:n,subscript:o,stringKey:r,value:s},pos:c}}}return{expr:{type:`ArithArrayElement`,array:n,index:o,stringKey:r},pos:a}}if(a=c(t,a),!i){for(let r of l)if(t.slice(a,a+r.length)===r&&t.slice(a,a+r.length+1)!==`==`){a+=r.length;let{expr:i,pos:o}=y(e,t,a);return{expr:{type:`ArithAssignment`,operator:r,variable:n,value:i},pos:o}}}return{expr:{type:`ArithVariable`,name:n,hasDollarPrefix:h},pos:a}}if(t[a]===`#`){let e=a+1;for(;e<t.length&&t[e]!==`
|
|
4
4
|
`;)e++;let n=t.slice(a,e).trim()||`#`;return{expr:{type:`ArithSyntaxError`,errorToken:n,message:`${n}: syntax error: invalid arithmetic operator (error token is "${n}")`},pos:t.length}}return{expr:{type:`ArithNumber`,value:0},pos:a}}var b={script(e){return{type:`Script`,statements:e}},statement(e,t=[],n=!1,r,i){let a={type:`Statement`,pipelines:e,operators:t,background:n};return r&&(a.deferredError=r),i!==void 0&&(a.sourceText=i),a},pipeline(e,t=!1,n=!1,r=!1,i){return{type:`Pipeline`,commands:e,negated:t,timed:n,timePosix:r,pipeStderr:i}},simpleCommand(e,t=[],n=[],r=[]){return{type:`SimpleCommand`,name:e,args:t,assignments:n,redirections:r}},word(e){return{type:`Word`,parts:e}},literal(e){return{type:`Literal`,value:e}},singleQuoted(e){return{type:`SingleQuoted`,value:e}},doubleQuoted(e){return{type:`DoubleQuoted`,parts:e}},escaped(e){return{type:`Escaped`,value:e}},parameterExpansion(e,t=null){return{type:`ParameterExpansion`,parameter:e,operation:t}},commandSubstitution(e,t=!1){return{type:`CommandSubstitution`,body:e,legacy:t}},arithmeticExpansion(e){return{type:`ArithmeticExpansion`,expression:e}},assignment(e,t,n=!1,r=null){return{type:`Assignment`,name:e,value:t,append:n,array:r}},redirection(e,t,n=null,r){let i={type:`Redirection`,fd:n,operator:e,target:t};return r&&(i.fdVariable=r),i},hereDoc(e,t,n=!1,r=!1){return{type:`HereDoc`,delimiter:e,content:t,stripTabs:n,quoted:r}},ifNode(e,t=null,n=[]){return{type:`If`,clauses:e,elseBody:t,redirections:n}},forNode(e,t,n,r=[]){return{type:`For`,variable:e,words:t,body:n,redirections:r}},whileNode(e,t,n=[]){return{type:`While`,condition:e,body:t,redirections:n}},untilNode(e,t,n=[]){return{type:`Until`,condition:e,body:t,redirections:n}},caseNode(e,t,n=[]){return{type:`Case`,word:e,items:t,redirections:n}},caseItem(e,t,n=`;;`){return{type:`CaseItem`,patterns:e,body:t,terminator:n}},subshell(e,t=[]){return{type:`Subshell`,body:e,redirections:t}},group(e,t=[]){return{type:`Group`,body:e,redirections:t}},functionDef(e,t,n=[],r){return{type:`FunctionDef`,name:e,body:t,redirections:n,sourceFile:r}},conditionalCommand(e,t=[],n){return{type:`ConditionalCommand`,expression:e,redirections:t,line:n}},arithmeticCommand(e,t=[],n){return{type:`ArithmeticCommand`,expression:e,redirections:t,line:n}}},x;(function(e){e.EOF=`EOF`,e.NEWLINE=`NEWLINE`,e.SEMICOLON=`SEMICOLON`,e.AMP=`AMP`,e.PIPE=`PIPE`,e.PIPE_AMP=`PIPE_AMP`,e.AND_AND=`AND_AND`,e.OR_OR=`OR_OR`,e.BANG=`BANG`,e.LESS=`LESS`,e.GREAT=`GREAT`,e.DLESS=`DLESS`,e.DGREAT=`DGREAT`,e.LESSAND=`LESSAND`,e.GREATAND=`GREATAND`,e.LESSGREAT=`LESSGREAT`,e.DLESSDASH=`DLESSDASH`,e.CLOBBER=`CLOBBER`,e.TLESS=`TLESS`,e.AND_GREAT=`AND_GREAT`,e.AND_DGREAT=`AND_DGREAT`,e.LPAREN=`LPAREN`,e.RPAREN=`RPAREN`,e.LBRACE=`LBRACE`,e.RBRACE=`RBRACE`,e.DSEMI=`DSEMI`,e.SEMI_AND=`SEMI_AND`,e.SEMI_SEMI_AND=`SEMI_SEMI_AND`,e.DBRACK_START=`DBRACK_START`,e.DBRACK_END=`DBRACK_END`,e.DPAREN_START=`DPAREN_START`,e.DPAREN_END=`DPAREN_END`,e.IF=`IF`,e.THEN=`THEN`,e.ELSE=`ELSE`,e.ELIF=`ELIF`,e.FI=`FI`,e.FOR=`FOR`,e.WHILE=`WHILE`,e.UNTIL=`UNTIL`,e.DO=`DO`,e.DONE=`DONE`,e.CASE=`CASE`,e.ESAC=`ESAC`,e.IN=`IN`,e.FUNCTION=`FUNCTION`,e.SELECT=`SELECT`,e.TIME=`TIME`,e.COPROC=`COPROC`,e.WORD=`WORD`,e.NAME=`NAME`,e.NUMBER=`NUMBER`,e.ASSIGNMENT_WORD=`ASSIGNMENT_WORD`,e.FD_VARIABLE=`FD_VARIABLE`,e.COMMENT=`COMMENT`,e.HEREDOC_CONTENT=`HEREDOC_CONTENT`})(x||={});var S=class extends Error{line;column;constructor(e,t,n){super(`line ${t}: ${e}`),this.line=t,this.column=n,this.name=`LexerError`}},ge=new Map([[`if`,x.IF],[`then`,x.THEN],[`else`,x.ELSE],[`elif`,x.ELIF],[`fi`,x.FI],[`for`,x.FOR],[`while`,x.WHILE],[`until`,x.UNTIL],[`do`,x.DO],[`done`,x.DONE],[`case`,x.CASE],[`esac`,x.ESAC],[`in`,x.IN],[`function`,x.FUNCTION],[`select`,x.SELECT],[`time`,x.TIME],[`coproc`,x.COPROC]]);function _e(e){let t=e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);if(!t)return!1;let n=e.slice(t[0].length);if(n===``||n===`+`)return!0;if(n[0]===`[`){let e=0,t=0;for(;t<n.length;t++)if(n[t]===`[`)e++;else if(n[t]===`]`&&(e--,e===0))break;if(e!==0||t>=n.length)return!1;let r=n.slice(t+1);return r===``||r===`+`}return!1}function ve(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];if(r===`[`)t++;else if(r===`]`)t--;else{if(t===0&&r===`=`)return n;if(t===0&&r===`+`&&e[n+1]===`=`)return n+1}}return-1}var ye=[[`;`,`;`,`&`,x.SEMI_SEMI_AND],[`<`,`<`,`<`,x.TLESS],[`&`,`>`,`>`,x.AND_DGREAT]],be=[[`[`,`[`,x.DBRACK_START],[`]`,`]`,x.DBRACK_END],[`(`,`(`,x.DPAREN_START],[`)`,`)`,x.DPAREN_END],[`&`,`&`,x.AND_AND],[`|`,`|`,x.OR_OR],[`;`,`;`,x.DSEMI],[`;`,`&`,x.SEMI_AND],[`|`,`&`,x.PIPE_AMP],[`>`,`>`,x.DGREAT],[`<`,`&`,x.LESSAND],[`>`,`&`,x.GREATAND],[`<`,`>`,x.LESSGREAT],[`>`,`|`,x.CLOBBER],[`&`,`>`,x.AND_GREAT]],xe=new Map([[`|`,x.PIPE],[`&`,x.AMP],[`;`,x.SEMICOLON],[`(`,x.LPAREN],[`)`,x.RPAREN],[`<`,x.LESS],[`>`,x.GREAT]]);function Se(e){return/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e)}function Ce(e){return e===` `||e===` `||e===`
|
|
@@ -72,4 +72,4 @@ Gid: ${i} ${i} ${i} ${i}
|
|
|
72
72
|
`};if(r||e.state.options.noglob)return{target:i};let s=await pi(e,t);if(!H(s,e.state.shoptOptions.extglob))return{target:i};let c=new Pt(e.fs,e.state.cwd,e.state.env,{globstar:e.state.shoptOptions.globstar,nullglob:e.state.shoptOptions.nullglob,failglob:e.state.shoptOptions.failglob,dotglob:e.state.shoptOptions.dotglob,extglob:e.state.shoptOptions.extglob,globskipdots:e.state.shoptOptions.globskipdots,maxGlobOperations:e.limits.maxGlobOperations}),l=await c.expand(s);return l.length===0?c.hasFailglob()?{error:`bash: no match: ${i}
|
|
73
73
|
`}:{target:i}:l.length===1?{target:l[0]}:{error:`bash: ${i}: ambiguous redirect
|
|
74
74
|
`}}async function Ci(e,t){let n=t.parts,r=n.length;if(r===1){let t=await $(e,n[0]);return Z(t,e.limits.maxStringLength,`word expansion`),t}let i=[];for(let t=0;t<r;t++)i.push(await $(e,n[t]));let a=i.join(``);return Z(a,e.limits.maxStringLength,`word expansion`),a}async function $(e,t,n=!1){if(t.type===`ParameterExpansion`)return wi(e,t,n);let r=li(e,t,n);if(r!==null)return r;switch(t.type){case`DoubleQuoted`:{let n=[];for(let r of t.parts)n.push(await $(e,r,!0));return n.join(``)}case`CommandSubstitution`:{let n=En(t.body);if(n)try{let t=await ui(e,n.target),r=t.startsWith(`/`)?t:`${e.state.cwd}/${t}`,i=await e.fs.readFile(r);e.state.lastExitCode=0,e.state.env.set(`?`,`0`);let a=i.replace(/\n+$/,``);return Z(a,e.limits.maxStringLength,`command substitution`),a}catch(t){if(t instanceof a)throw t;return e.state.lastExitCode=1,e.state.env.set(`?`,`1`),``}let r=e.substitutionDepth??0,i=e.limits.maxSubstitutionDepth;if(r>=i)throw new a(`Command substitution nesting limit exceeded (${i})`,`substitution_depth`);let s=e.substitutionDepth;e.substitutionDepth=r+1;let c=e.state.bashPid;e.state.bashPid=e.state.nextVirtualPid++;let l=new Map(e.state.env),u=e.state.cwd,d=e.state.suppressVerbose;e.state.suppressVerbose=!0;try{let n=await e.executeScript(t.body),r=n.exitCode;e.state.env=l,e.state.cwd=u,e.state.suppressVerbose=d,e.state.lastExitCode=r,e.state.env.set(`?`,String(r)),n.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||``)+n.stderr),e.state.bashPid=c,e.substitutionDepth=s;let i=n.stdout.replace(/\n+$/,``);return Z(i,e.limits.maxStringLength,`command substitution`),i}catch(t){if(e.state.env=l,e.state.cwd=u,e.state.bashPid=c,e.substitutionDepth=s,e.state.suppressVerbose=d,t instanceof a)throw t;if(t instanceof o){e.state.lastExitCode=t.exitCode,e.state.env.set(`?`,String(t.exitCode)),t.stderr&&(e.state.expansionStderr=(e.state.expansionStderr||``)+t.stderr);let n=t.stdout.replace(/\n+$/,``);return Z(n,e.limits.maxStringLength,`command substitution`),n}throw t}}case`ArithmeticExpansion`:{let n=t.expression.originalText;if(n&&/\$[a-zA-Z_][a-zA-Z0-9_]*(?![{[(])/.test(n)){let t=await xn(e,n),r=h(new D,t);return String(await O(e,r.expression,!0))}return String(await O(e,t.expression.expression,!0))}case`BraceExpansion`:{let n=[];for(let r of t.items)if(r.type===`Range`){let e=Tn(r.start,r.end,r.step,r.startStr,r.endStr);if(e.expanded)n.push(...e.expanded);else return e.literal}else n.push(await ui(e,r.word));return n.join(` `)}default:return``}}async function wi(e,t,n=!1){let{parameter:r}=t,{operation:i}=t,a=r.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(a){let[,t,n]=a;(e.state.associativeArrays?.has(t)||n.includes(`$(`)||n.includes("`")||n.includes("${"))&&(r=`${t}[${await Sn(e,n)}]`)}else if(/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(r)&&P(e,r)){let t=F(e,r);if(t&&t!==r){let n=t.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\[(.+)\]$/);if(n){let[,t,i]=n;(e.state.associativeArrays?.has(t)||i.includes(`$(`)||i.includes("`")||i.includes("${"))&&(r=`${t}[${await Sn(e,i)}]`)}}}let o=i&&(i.type===`DefaultValue`||i.type===`AssignDefault`||i.type===`UseAlternative`||i.type===`ErrorIfUnset`),c=await z(e,r,!o);if(!i)return c;let l=!await B(e,r),{isEmpty:u,effectiveValue:d}=nr(e,r,c,n),f={value:c,isUnset:l,isEmpty:u,effectiveValue:d,inDoubleQuotes:n};switch(i.type){case`DefaultValue`:return Un(e,i,f,Q);case`AssignDefault`:return Wn(e,r,i,f,Q);case`ErrorIfUnset`:return Gn(e,r,i,f,Q);case`UseAlternative`:return Kn(e,i,f,Q);case`PatternRemoval`:{let t=await qn(e,c,i,Q,$);return Z(t,e.limits.maxStringLength,`pattern removal`),t}case`PatternReplacement`:{let t=await Jn(e,c,i,Q,$);return Z(t,e.limits.maxStringLength,`pattern replacement`),t}case`Length`:return Yn(e,r,c);case`LengthSliceError`:throw new s(r);case`BadSubstitution`:throw new s(i.text);case`Substring`:return Xn(e,r,c,i);case`CaseModification`:{let t=await Zn(e,c,i,Q,wi);return Z(t,e.limits.maxStringLength,`case modification`),t}case`Transform`:return Qn(e,r,c,l,i);case`Indirection`:return $n(e,r,c,l,i,wi,n);case`ArrayKeys`:return er(e,i);case`VarNamePrefix`:return tr(e,i);default:return c}}export{Qt as A,zn as B,Yt as C,Bn as D,On as E,S as F,yn as H,mn as I,vn as L,Vn as M,Xt as N,Et as O,Rn as P,z as R,U as S,fi as T,Jt as V,fn as _,_n as a,P as b,h as c,L as d,ui as f,A as g,di as h,nn as i,F as j,Hn as k,Si as l,I as m,hn as n,xi as o,O as p,Zt as r,C as s,ci as t,en as u,D as v,R as w,ln as x,pn as y,yi as z};
|
|
75
|
-
//# sourceMappingURL=chunk-FEIOJCZD-
|
|
75
|
+
//# sourceMappingURL=chunk-FEIOJCZD-NzTooVTc.mjs.map
|
|
@@ -5,4 +5,4 @@ var e=class extends Error{stdout;stderr;constructor(e,t=``,n=``){super(e),this.s
|
|
|
5
5
|
`}},u=class extends e{name=`BraceExpansionError`;constructor(e,t=``,n=``){super(e,t,n),this.stderr=n||`bash: ${e}
|
|
6
6
|
`}},d=class extends e{limitType;name=`ExecutionLimitError`;static EXIT_CODE=126;constructor(e,t,n=``,r=``){super(e,n,r),this.limitType=t,this.stderr=r||`bash: ${e}
|
|
7
7
|
`}},f=class extends e{name=`ExecutionAbortedError`;constructor(e=``,t=``){super(`execution aborted`,e,t)}},p=class extends e{name=`SubshellExitError`;constructor(e=``,t=``){super(`subshell exit`,e,t)}};function m(e){return e instanceof t||e instanceof n||e instanceof r}var h=class extends e{exitCode;name=`PosixFatalError`;constructor(e,t=``,n=``){super(`posix fatal error`,t,n),this.exitCode=e}};export{t as a,l as c,u as d,s as f,a as h,d as i,r as l,m,h as n,o,i as p,n as r,p as s,f as t,c as u};
|
|
8
|
-
//# sourceMappingURL=chunk-GFQRA5P5-
|
|
8
|
+
//# sourceMappingURL=chunk-GFQRA5P5-DbAN9IDm.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./chunk-A5O5YHGN-
|
|
1
|
+
import{n as e,t}from"./chunk-A5O5YHGN-DApqA6Ow.mjs";import{r as n,t as r}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{t as i}from"./chunk-3ZUFRYJ4-Bv1jGN68.mjs";var a={name:`sleep`,summary:`delay for a specified amount of time`,usage:`sleep NUMBER[SUFFIX]`,description:`Pause for NUMBER seconds. SUFFIX may be:
|
|
2
2
|
s - seconds (default)
|
|
3
3
|
m - minutes
|
|
4
4
|
h - hours
|
|
@@ -7,4 +7,4 @@ import{n as e,t}from"./chunk-A5O5YHGN-Kbs3GRxW.mjs";import{r as n,t as r}from"./
|
|
|
7
7
|
NUMBER may be a decimal number.`,options:[` --help display this help and exit`]},o=36e5,s={name:`sleep`,async execute(s,c){if(r(s))return n(a);if(s.length===0)return{stdout:``,stderr:`sleep: missing operand
|
|
8
8
|
`,exitCode:1};let l=0;for(let e of s){let t=i(e);if(t===null)return{stdout:``,stderr:`sleep: invalid time interval '${e}'
|
|
9
9
|
`,exitCode:1};l+=t}return l>o&&(l=o),c.signal?.aborted||(c.sleep?await c.sleep(l):c.signal?await new Promise(n=>{let r=()=>{e(i),n()},i=t(()=>{c.signal?.removeEventListener(`abort`,r),n()},l);c.signal?.addEventListener(`abort`,r,{once:!0})}):await new Promise(e=>t(e,l))),{stdout:``,stderr:``,exitCode:0}}},c={name:`sleep`,flags:[],needsArgs:!0};export{s as n,c as t};
|
|
10
|
-
//# sourceMappingURL=chunk-GOV5EKKI-
|
|
10
|
+
//# sourceMappingURL=chunk-GOV5EKKI-CDGzZWfT.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,s as t,t as n}from"./chunk-C94x7I9S.mjs";import{t as r}from"./chunk-5QMZ5MUS-_0tQyQsf.mjs";import{n as i,t as a}from"./chunk-A5O5YHGN-Kbs3GRxW.mjs";import{n as o}from"./chunk-24IMIIXA-BoP5OA93.mjs";import{n as s,t as c}from"./chunk-3THT3N7L-CBWmNncQ.mjs";import{r as l,t as u}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{dirname as d,join as f}from"node:path";import{fileURLToPath as p}from"node:url";import{existsSync as m}from"node:fs";import{randomBytes as h}from"node:crypto";import{Worker as g}from"node:worker_threads";var _=t(n(((t,n)=>{var r=void 0,i=function(t){return r||(r=new Promise(function(r,i){var a=t===void 0?{}:t,o=a.onAbort;a.onAbort=function(e){i(Error(e)),o&&o(e)},a.postRun=a.postRun||[],a.postRun.push(function(){r(a)}),n=void 0;var s;s||=a===void 0?{}:a;var c=!!globalThis.window,l=!!globalThis.WorkerGlobalScope,u=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;s.onRuntimeInitialized=function(){function e(e,t){switch(typeof t){case`boolean`:fe(e,t?1:0);break;case`number`:ue(e,t);break;case`string`:j(e,t,-1,-1);break;case`object`:if(t===null)de(e);else if(t.length!=null){var n=Mt(t.length);C.set(t,n),M(e,n,t.length,-1),Nt(n)}else P(e,`Wrong API use : tried to return a value of an unknown type (`+t+`).`,-1);break;default:de(e)}}function t(e,t){for(var n=[],r=0;r<e;r+=1){var i=N(t+4*r,`i32`),a=ae(i);if(a===1||a===2)i=le(i);else if(a===3)i=se(i);else if(a===4){a=i,i=oe(a),a=ce(a);for(var o=new Uint8Array(i),s=0;s<i;s+=1)o[s]=C[a+s];i=o}else i=null;n.push(i)}return n}function n(e,t){this.Qa=e,this.db=t,this.Oa=1,this.mb=[]}function r(e,t){if(this.db=t,this.fb=Et(e),this.fb===null)throw Error(`Unable to allocate memory for the SQL string`);this.lb=this.fb,this.$a=this.sb=null}function i(e){if(this.filename=`dbfile_`+(4294967295*Math.random()>>>0),e!=null){var t=this.filename,n=`/`,r=t;if(n&&(n=typeof n==`string`?n:Re(n),r=t?ge(n+`/`+t):n),t=ke(!0,!0),r=Qe(r,t),e){if(typeof e==`string`){n=Array(e.length);for(var i=0,o=e.length;i<o;++i)n[i]=e.charCodeAt(i);e=n}at(r,t|146),n=st(r,577),dt(n,e,0,e.length,0),ct(n),at(r,t)}}this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),this.gb={},this.Sa={}}var a=Q(4),o=s.cwrap,c=o(`sqlite3_open`,`number`,[`string`,`number`]),l=o(`sqlite3_close_v2`,`number`,[`number`]),u=o(`sqlite3_exec`,`number`,[`number`,`string`,`number`,`number`,`number`]),d=o(`sqlite3_changes`,`number`,[`number`]),f=o(`sqlite3_prepare_v2`,`number`,[`number`,`string`,`number`,`number`,`number`]),p=o(`sqlite3_sql`,`string`,[`number`]),m=o(`sqlite3_normalized_sql`,`string`,[`number`]),h=o(`sqlite3_prepare_v2`,`number`,[`number`,`number`,`number`,`number`,`number`]),g=o(`sqlite3_bind_text`,`number`,[`number`,`number`,`number`,`number`,`number`]),_=o(`sqlite3_bind_blob`,`number`,[`number`,`number`,`number`,`number`,`number`]),ee=o(`sqlite3_bind_double`,`number`,[`number`,`number`,`number`]),v=o(`sqlite3_bind_int`,`number`,[`number`,`number`,`number`]),y=o(`sqlite3_bind_parameter_index`,`number`,[`number`,`string`]),b=o(`sqlite3_step`,`number`,[`number`]),x=o(`sqlite3_errmsg`,`string`,[`number`]),S=o(`sqlite3_column_count`,`number`,[`number`]),w=o(`sqlite3_data_count`,`number`,[`number`]),T=o(`sqlite3_column_double`,`number`,[`number`,`number`]),E=o(`sqlite3_column_text`,`string`,[`number`,`number`]),D=o(`sqlite3_column_blob`,`number`,[`number`,`number`]),te=o(`sqlite3_column_bytes`,`number`,[`number`,`number`]),ne=o(`sqlite3_column_type`,`number`,[`number`,`number`]),O=o(`sqlite3_column_name`,`string`,[`number`,`number`]),re=o(`sqlite3_reset`,`number`,[`number`]),k=o(`sqlite3_clear_bindings`,`number`,[`number`]),A=o(`sqlite3_finalize`,`number`,[`number`]),ie=o(`sqlite3_create_function_v2`,`number`,`number string number number number number number number number`.split(` `)),ae=o(`sqlite3_value_type`,`number`,[`number`]),oe=o(`sqlite3_value_bytes`,`number`,[`number`]),se=o(`sqlite3_value_text`,`string`,[`number`]),ce=o(`sqlite3_value_blob`,`number`,[`number`]),le=o(`sqlite3_value_double`,`number`,[`number`]),ue=o(`sqlite3_result_double`,``,[`number`,`number`]),de=o(`sqlite3_result_null`,``,[`number`]),j=o(`sqlite3_result_text`,``,[`number`,`string`,`number`,`number`]),M=o(`sqlite3_result_blob`,``,[`number`,`number`,`number`,`number`]),fe=o(`sqlite3_result_int`,``,[`number`,`number`]),P=o(`sqlite3_result_error`,``,[`number`,`string`,`number`]),me=o(`sqlite3_aggregate_context`,`number`,[`number`,`number`]),he=o(`RegisterExtensionFunctions`,`number`,[`number`]),_e=o(`sqlite3_update_hook`,`number`,[`number`,`number`,`number`]);n.prototype.bind=function(e){if(!this.Qa)throw`Statement closed`;return this.reset(),Array.isArray(e)?this.Gb(e):typeof e==`object`&&e?this.Hb(e):!0},n.prototype.step=function(){if(!this.Qa)throw`Statement closed`;this.Oa=1;var e=b(this.Qa);switch(e){case 100:return!0;case 101:return!1;default:throw this.db.handleError(e)}},n.prototype.Ab=function(e){return e??(e=this.Oa,this.Oa+=1),T(this.Qa,e)},n.prototype.Ob=function(e){if(e??(e=this.Oa,this.Oa+=1),e=E(this.Qa,e),typeof BigInt!=`function`)throw Error(`BigInt is not supported`);return BigInt(e)},n.prototype.Tb=function(e){return e??(e=this.Oa,this.Oa+=1),E(this.Qa,e)},n.prototype.getBlob=function(e){e??(e=this.Oa,this.Oa+=1);var t=te(this.Qa,e);e=D(this.Qa,e);for(var n=new Uint8Array(t),r=0;r<t;r+=1)n[r]=C[e+r];return n},n.prototype.get=function(e,t){t||={},e!=null&&this.bind(e)&&this.step(),e=[];for(var n=w(this.Qa),r=0;r<n;r+=1)switch(ne(this.Qa,r)){case 1:var i=t.useBigInt?this.Ob(r):this.Ab(r);e.push(i);break;case 2:e.push(this.Ab(r));break;case 3:e.push(this.Tb(r));break;case 4:e.push(this.getBlob(r));break;default:e.push(null)}return e},n.prototype.qb=function(){for(var e=[],t=S(this.Qa),n=0;n<t;n+=1)e.push(O(this.Qa,n));return e},n.prototype.zb=function(e,t){e=this.get(e,t),t=this.qb();for(var n={},r=0;r<t.length;r+=1)n[t[r]]=e[r];return n},n.prototype.Sb=function(){return p(this.Qa)},n.prototype.Pb=function(){return m(this.Qa)},n.prototype.run=function(e){return e!=null&&this.bind(e),this.step(),this.reset()},n.prototype.wb=function(e,t){t??(t=this.Oa,this.Oa+=1),e=Et(e),this.mb.push(e),this.db.handleError(g(this.Qa,t,e,-1,0))},n.prototype.Fb=function(e,t){t??(t=this.Oa,this.Oa+=1);var n=Mt(e.length);C.set(e,n),this.mb.push(n),this.db.handleError(_(this.Qa,t,n,e.length,0))},n.prototype.vb=function(e,t){t??(t=this.Oa,this.Oa+=1),this.db.handleError((e===(e|0)?v:ee)(this.Qa,t,e))},n.prototype.Ib=function(e){e??(e=this.Oa,this.Oa+=1),_(this.Qa,e,0,0,0)},n.prototype.xb=function(e,t){switch(t??(t=this.Oa,this.Oa+=1),typeof e){case`string`:this.wb(e,t);return;case`number`:this.vb(e,t);return;case`bigint`:this.wb(e.toString(),t);return;case`boolean`:this.vb(e+0,t);return;case`object`:if(e===null){this.Ib(t);return}if(e.length!=null){this.Fb(e,t);return}}throw`Wrong API use : tried to bind a value of an unknown type (`+e+`).`},n.prototype.Hb=function(e){var t=this;return Object.keys(e).forEach(function(n){var r=y(t.Qa,n);r!==0&&t.xb(e[n],r)}),!0},n.prototype.Gb=function(e){for(var t=0;t<e.length;t+=1)this.xb(e[t],t+1);return!0},n.prototype.reset=function(){return this.freemem(),k(this.Qa)===0&&re(this.Qa)===0},n.prototype.freemem=function(){for(var e;(e=this.mb.pop())!==void 0;)Nt(e)},n.prototype.Ya=function(){this.freemem();var e=A(this.Qa)===0;return delete this.db.gb[this.Qa],this.Qa=0,e},r.prototype.next=function(){if(this.fb===null)return{done:!0};if(this.$a!==null&&(this.$a.Ya(),this.$a=null),!this.db.db)throw this.ob(),Error(`Database closed`);var e=Lt(),t=Q(4);pe(a),pe(t);try{this.db.handleError(h(this.db.db,this.lb,-1,a,t)),this.lb=N(t,`i32`);var r=N(a,`i32`);return r===0?(this.ob(),{done:!0}):(this.$a=new n(r,this.db),this.db.gb[r]=this.$a,{value:this.$a,done:!1})}catch(e){throw this.sb=F(this.lb),this.ob(),e}finally{It(e)}},r.prototype.ob=function(){Nt(this.fb),this.fb=null},r.prototype.Qb=function(){return this.sb===null?F(this.lb):this.sb},typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`&&(r.prototype[Symbol.iterator]=function(){return this}),i.prototype.run=function(e,t){if(!this.db)throw`Database closed`;if(t){e=this.tb(e,t);try{e.step()}finally{e.Ya()}}else this.handleError(u(this.db,e,0,0,a));return this},i.prototype.exec=function(e,t,r){if(!this.db)throw`Database closed`;var i=null,o=null,s=null;try{s=o=Et(e);var c=Q(4);for(e=[];N(s,`i8`)!==0;){pe(a),pe(c),this.handleError(h(this.db,s,-1,a,c));var l=N(a,`i32`);if(s=N(c,`i32`),l!==0){var u=null;for(i=new n(l,this),t!=null&&i.bind(t);i.step();)u===null&&(u={columns:i.qb(),values:[]},e.push(u)),u.values.push(i.get(null,r));i.Ya()}}return e}catch(e){throw i&&i.Ya(),e}finally{o&&Nt(o)}},i.prototype.Mb=function(e,t,n,r,i){typeof t==`function`&&(r=n,n=t,t=void 0),e=this.tb(e,t);try{for(;e.step();)n(e.zb(null,i))}finally{e.Ya()}if(typeof r==`function`)return r()},i.prototype.tb=function(e,t){if(pe(a),this.handleError(f(this.db,e,-1,a,0)),e=N(a,`i32`),e===0)throw`Nothing to prepare`;var r=new n(e,this);return t!=null&&r.bind(t),this.gb[e]=r},i.prototype.Ub=function(e){return new r(e,this)},i.prototype.Nb=function(){Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.handleError(l(this.db));var e=ft(this.filename);return this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),e},i.prototype.close=function(){this.db!==null&&(Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.Za&&=(Z(this.Za),void 0),this.handleError(l(this.db)),nt(`/`+this.filename),this.db=null)},i.prototype.handleError=function(e){if(e===0)return null;throw e=x(this.db),Error(e)},i.prototype.Rb=function(){return d(this.db)},i.prototype.Kb=function(n,r){Object.prototype.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]);var i=jt(function(n,i,a){i=t(i,a);try{var o=r.apply(null,i)}catch(e){P(n,e,-1);return}e(n,o)},`viii`);return this.Sa[n]=i,this.handleError(ie(this.db,n,r.length,1,0,i,0,0,0)),this},i.prototype.Jb=function(n,r){var i=r.init||function(){return null},a=r.finalize||function(e){return e},o=r.step;if(!o)throw`An aggregate function must have a step function in `+n;var s={};Object.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]),r=n+`__finalize`,Object.hasOwnProperty.call(this.Sa,r)&&(Z(this.Sa[r]),delete this.Sa[r]);var c=jt(function(e,n,r){var a=me(e,1);Object.hasOwnProperty.call(s,a)||(s[a]=i()),n=t(n,r),n=[s[a]].concat(n);try{s[a]=o.apply(null,n)}catch(t){delete s[a],P(e,t,-1)}},`viii`),l=jt(function(t){var n=me(t,1);try{var r=a(s[n])}catch(e){delete s[n],P(t,e,-1);return}e(t,r),delete s[n]},`vi`);return this.Sa[n]=c,this.Sa[r]=l,this.handleError(ie(this.db,n,o.length-1,1,0,0,c,l,0)),this},i.prototype.Zb=function(e){return this.Za&&=(_e(this.db,0,0),Z(this.Za),void 0),e?(this.Za=jt(function(t,n,r,i,a){switch(n){case 18:t=`insert`;break;case 23:t=`update`;break;case 9:t=`delete`;break;default:throw`unknown operationCode in updateHook callback: `+n}if(r=F(r),i=F(i),a>2**53-1)throw`rowId too big to fit inside a Number`;e(t,r,i,Number(a))},`viiiij`),_e(this.db,this.Za,0),this):this},n.prototype.bind=n.prototype.bind,n.prototype.step=n.prototype.step,n.prototype.get=n.prototype.get,n.prototype.getColumnNames=n.prototype.qb,n.prototype.getAsObject=n.prototype.zb,n.prototype.getSQL=n.prototype.Sb,n.prototype.getNormalizedSQL=n.prototype.Pb,n.prototype.run=n.prototype.run,n.prototype.reset=n.prototype.reset,n.prototype.freemem=n.prototype.freemem,n.prototype.free=n.prototype.Ya,r.prototype.next=r.prototype.next,r.prototype.getRemainingSQL=r.prototype.Qb,i.prototype.run=i.prototype.run,i.prototype.exec=i.prototype.exec,i.prototype.each=i.prototype.Mb,i.prototype.prepare=i.prototype.tb,i.prototype.iterateStatements=i.prototype.Ub,i.prototype.export=i.prototype.Nb,i.prototype.close=i.prototype.close,i.prototype.handleError=i.prototype.handleError,i.prototype.getRowsModified=i.prototype.Rb,i.prototype.create_function=i.prototype.Kb,i.prototype.create_aggregate=i.prototype.Jb,i.prototype.updateHook=i.prototype.Zb,s.Database=i};var d=`./this.program`,f=(e,t)=>{throw t},p=globalThis.document?.currentScript?.src;typeof __filename<`u`?p=__filename:l&&(p=self.location.href);var m=``,h,g;if(u){var _=e(`node:fs`);m=__dirname+`/`,g=e=>(e=S(e)?new URL(e):e,_.readFileSync(e)),h=async e=>(e=S(e)?new URL(e):e,_.readFileSync(e,void 0)),1<process.argv.length&&(d=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),n!==void 0&&(n.exports=s),f=(e,t)=>{throw process.exitCode=e,t}}else if(c||l){try{m=new URL(`.`,p).href}catch{}l&&(g=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),h=async e=>{if(S(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var ee=console.log.bind(console),v=console.error.bind(console),y,b=!1,x,S=e=>e.startsWith(`file://`),C,w,T,E,D,te,ne,O;function re(){var e=Rt.buffer;C=new Int8Array(e),T=new Int16Array(e),w=new Uint8Array(e),new Uint16Array(e),E=new Int32Array(e),D=new Uint32Array(e),te=new Float32Array(e),ne=new Float64Array(e),O=new BigInt64Array(e),new BigUint64Array(e)}function k(e){throw s.onAbort?.(e),e=`Aborted(`+e+`)`,v(e),b=!0,new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`)}var A;async function ie(e){if(!y)try{var t=await h(e);return new Uint8Array(t)}catch{}if(e==A&&y)e=new Uint8Array(y);else if(g)e=g(e);else throw`both async and sync fetching of the wasm failed`;return e}async function ae(e,t){try{var n=await ie(e);return await WebAssembly.instantiate(n,t)}catch(e){v(`failed to asynchronously prepare wasm: ${e}`),k(e)}}async function oe(e){var t=A;if(!y&&!S(t)&&!u)try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){v(`wasm streaming compile failed: ${e}`),v(`falling back to ArrayBuffer instantiation`)}return ae(t,e)}class se{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var ce=e=>{for(;0<e.length;)e.shift()(s)},le=[],ue=[],de=()=>{var e=s.preRun.shift();ue.push(e)},j=0,M=null;function N(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return C[e];case`i8`:return C[e];case`i16`:return T[e>>1];case`i32`:return E[e>>2];case`i64`:return O[e>>3];case`float`:return te[e>>2];case`double`:return ne[e>>3];case`*`:return D[e>>2];default:k(`invalid type for getValue: ${t}`)}}var fe=!0;function pe(e){var t=`i32`;switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:C[e]=0;break;case`i8`:C[e]=0;break;case`i16`:T[e>>1]=0;break;case`i32`:E[e>>2]=0;break;case`i64`:O[e>>3]=BigInt(0);break;case`float`:te[e>>2]=0;break;case`double`:ne[e>>3]=0;break;case`*`:D[e>>2]=0;break;default:k(`invalid type for setValue: ${t}`)}}var P=new TextDecoder,me=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},F=(e,t,n)=>e?P.decode(w.subarray(e,me(w,e,t,n))):``,he=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},ge=e=>{var t=e.charAt(0)===`/`,n=e.slice(-1)===`/`;return(e=he(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},_e=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.slice(0,-1),e+t)},ve=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],ye=()=>{if(u){var t=e(`node:crypto`);return e=>t.randomFillSync(e)}return e=>crypto.getRandomValues(e)},be=e=>{(be=ye())(e)},xe=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;t=n+`/`+t,n=n.charAt(0)===`/`}return t=he(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},Se=e=>{var t=me(e,0);return P.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},Ce=[],I=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},L=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.codePointAt(a);if(127>=o){if(n>=r)break;t[n++]=o}else if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63,a++}}return t[n]=0,n-i},we=[];function Te(e,t){we[e]={input:[],output:[],eb:t},Ye(e,Ee)}var Ee={open(e){var t=we[e.node.rdev];if(!t)throw new B(43);e.tty=t,e.seekable=!1},close(e){e.tty.eb.fsync(e.tty)},fsync(e){e.tty.eb.fsync(e.tty)},read(e,t,n,r){if(!e.tty||!e.tty.eb.Bb)throw new B(60);for(var i=0,a=0;a<r;a++){try{var o=e.tty.eb.Bb(e.tty)}catch{throw new B(29)}if(o===void 0&&i===0)throw new B(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.atime=Date.now()),i},write(e,t,n,r){if(!e.tty||!e.tty.eb.ub)throw new B(60);try{for(var i=0;i<r;i++)e.tty.eb.ub(e.tty,t[n+i])}catch{throw new B(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),i}},De={Bb(){a:{if(!Ce.length){var e=null;if(u){var t=Buffer.alloc(256),n=0,r=process.stdin.fd;try{n=_.readSync(r,t,0,256)}catch(e){if(e.toString().includes(`EOF`))n=0;else throw e}0<n&&(e=t.slice(0,n).toString(`utf-8`))}else globalThis.window?.prompt&&(e=window.prompt(`Input: `),e!==null&&(e+=`
|
|
1
|
+
import{a as e,s as t,t as n}from"./chunk-C94x7I9S.mjs";import{t as r}from"./chunk-5QMZ5MUS-BwpNU33k.mjs";import{n as i,t as a}from"./chunk-A5O5YHGN-DApqA6Ow.mjs";import{n as o}from"./chunk-24IMIIXA-DaS5XS55.mjs";import{n as s,t as c}from"./chunk-3THT3N7L-B1WzJUh4.mjs";import{r as l,t as u}from"./chunk-74CEPOFO-V0JXh91S.mjs";import{dirname as d,join as f}from"node:path";import{existsSync as p}from"node:fs";import{fileURLToPath as m}from"node:url";import{randomBytes as h}from"node:crypto";import{Worker as g}from"node:worker_threads";var _=t(n(((t,n)=>{var r=void 0,i=function(t){return r||(r=new Promise(function(r,i){var a=t===void 0?{}:t,o=a.onAbort;a.onAbort=function(e){i(Error(e)),o&&o(e)},a.postRun=a.postRun||[],a.postRun.push(function(){r(a)}),n=void 0;var s;s||=a===void 0?{}:a;var c=!!globalThis.window,l=!!globalThis.WorkerGlobalScope,u=globalThis.process?.versions?.node&&globalThis.process?.type!=`renderer`;s.onRuntimeInitialized=function(){function e(e,t){switch(typeof t){case`boolean`:fe(e,t?1:0);break;case`number`:ue(e,t);break;case`string`:j(e,t,-1,-1);break;case`object`:if(t===null)de(e);else if(t.length!=null){var n=Mt(t.length);C.set(t,n),M(e,n,t.length,-1),Nt(n)}else P(e,`Wrong API use : tried to return a value of an unknown type (`+t+`).`,-1);break;default:de(e)}}function t(e,t){for(var n=[],r=0;r<e;r+=1){var i=N(t+4*r,`i32`),a=ae(i);if(a===1||a===2)i=le(i);else if(a===3)i=se(i);else if(a===4){a=i,i=oe(a),a=ce(a);for(var o=new Uint8Array(i),s=0;s<i;s+=1)o[s]=C[a+s];i=o}else i=null;n.push(i)}return n}function n(e,t){this.Qa=e,this.db=t,this.Oa=1,this.mb=[]}function r(e,t){if(this.db=t,this.fb=Et(e),this.fb===null)throw Error(`Unable to allocate memory for the SQL string`);this.lb=this.fb,this.$a=this.sb=null}function i(e){if(this.filename=`dbfile_`+(4294967295*Math.random()>>>0),e!=null){var t=this.filename,n=`/`,r=t;if(n&&(n=typeof n==`string`?n:Re(n),r=t?ge(n+`/`+t):n),t=ke(!0,!0),r=Qe(r,t),e){if(typeof e==`string`){n=Array(e.length);for(var i=0,o=e.length;i<o;++i)n[i]=e.charCodeAt(i);e=n}at(r,t|146),n=st(r,577),dt(n,e,0,e.length,0),ct(n),at(r,t)}}this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),this.gb={},this.Sa={}}var a=Q(4),o=s.cwrap,c=o(`sqlite3_open`,`number`,[`string`,`number`]),l=o(`sqlite3_close_v2`,`number`,[`number`]),u=o(`sqlite3_exec`,`number`,[`number`,`string`,`number`,`number`,`number`]),d=o(`sqlite3_changes`,`number`,[`number`]),f=o(`sqlite3_prepare_v2`,`number`,[`number`,`string`,`number`,`number`,`number`]),p=o(`sqlite3_sql`,`string`,[`number`]),m=o(`sqlite3_normalized_sql`,`string`,[`number`]),h=o(`sqlite3_prepare_v2`,`number`,[`number`,`number`,`number`,`number`,`number`]),g=o(`sqlite3_bind_text`,`number`,[`number`,`number`,`number`,`number`,`number`]),_=o(`sqlite3_bind_blob`,`number`,[`number`,`number`,`number`,`number`,`number`]),ee=o(`sqlite3_bind_double`,`number`,[`number`,`number`,`number`]),v=o(`sqlite3_bind_int`,`number`,[`number`,`number`,`number`]),y=o(`sqlite3_bind_parameter_index`,`number`,[`number`,`string`]),b=o(`sqlite3_step`,`number`,[`number`]),x=o(`sqlite3_errmsg`,`string`,[`number`]),S=o(`sqlite3_column_count`,`number`,[`number`]),w=o(`sqlite3_data_count`,`number`,[`number`]),T=o(`sqlite3_column_double`,`number`,[`number`,`number`]),E=o(`sqlite3_column_text`,`string`,[`number`,`number`]),D=o(`sqlite3_column_blob`,`number`,[`number`,`number`]),te=o(`sqlite3_column_bytes`,`number`,[`number`,`number`]),ne=o(`sqlite3_column_type`,`number`,[`number`,`number`]),O=o(`sqlite3_column_name`,`string`,[`number`,`number`]),re=o(`sqlite3_reset`,`number`,[`number`]),k=o(`sqlite3_clear_bindings`,`number`,[`number`]),A=o(`sqlite3_finalize`,`number`,[`number`]),ie=o(`sqlite3_create_function_v2`,`number`,`number string number number number number number number number`.split(` `)),ae=o(`sqlite3_value_type`,`number`,[`number`]),oe=o(`sqlite3_value_bytes`,`number`,[`number`]),se=o(`sqlite3_value_text`,`string`,[`number`]),ce=o(`sqlite3_value_blob`,`number`,[`number`]),le=o(`sqlite3_value_double`,`number`,[`number`]),ue=o(`sqlite3_result_double`,``,[`number`,`number`]),de=o(`sqlite3_result_null`,``,[`number`]),j=o(`sqlite3_result_text`,``,[`number`,`string`,`number`,`number`]),M=o(`sqlite3_result_blob`,``,[`number`,`number`,`number`,`number`]),fe=o(`sqlite3_result_int`,``,[`number`,`number`]),P=o(`sqlite3_result_error`,``,[`number`,`string`,`number`]),me=o(`sqlite3_aggregate_context`,`number`,[`number`,`number`]),he=o(`RegisterExtensionFunctions`,`number`,[`number`]),_e=o(`sqlite3_update_hook`,`number`,[`number`,`number`,`number`]);n.prototype.bind=function(e){if(!this.Qa)throw`Statement closed`;return this.reset(),Array.isArray(e)?this.Gb(e):typeof e==`object`&&e?this.Hb(e):!0},n.prototype.step=function(){if(!this.Qa)throw`Statement closed`;this.Oa=1;var e=b(this.Qa);switch(e){case 100:return!0;case 101:return!1;default:throw this.db.handleError(e)}},n.prototype.Ab=function(e){return e??(e=this.Oa,this.Oa+=1),T(this.Qa,e)},n.prototype.Ob=function(e){if(e??(e=this.Oa,this.Oa+=1),e=E(this.Qa,e),typeof BigInt!=`function`)throw Error(`BigInt is not supported`);return BigInt(e)},n.prototype.Tb=function(e){return e??(e=this.Oa,this.Oa+=1),E(this.Qa,e)},n.prototype.getBlob=function(e){e??(e=this.Oa,this.Oa+=1);var t=te(this.Qa,e);e=D(this.Qa,e);for(var n=new Uint8Array(t),r=0;r<t;r+=1)n[r]=C[e+r];return n},n.prototype.get=function(e,t){t||={},e!=null&&this.bind(e)&&this.step(),e=[];for(var n=w(this.Qa),r=0;r<n;r+=1)switch(ne(this.Qa,r)){case 1:var i=t.useBigInt?this.Ob(r):this.Ab(r);e.push(i);break;case 2:e.push(this.Ab(r));break;case 3:e.push(this.Tb(r));break;case 4:e.push(this.getBlob(r));break;default:e.push(null)}return e},n.prototype.qb=function(){for(var e=[],t=S(this.Qa),n=0;n<t;n+=1)e.push(O(this.Qa,n));return e},n.prototype.zb=function(e,t){e=this.get(e,t),t=this.qb();for(var n={},r=0;r<t.length;r+=1)n[t[r]]=e[r];return n},n.prototype.Sb=function(){return p(this.Qa)},n.prototype.Pb=function(){return m(this.Qa)},n.prototype.run=function(e){return e!=null&&this.bind(e),this.step(),this.reset()},n.prototype.wb=function(e,t){t??(t=this.Oa,this.Oa+=1),e=Et(e),this.mb.push(e),this.db.handleError(g(this.Qa,t,e,-1,0))},n.prototype.Fb=function(e,t){t??(t=this.Oa,this.Oa+=1);var n=Mt(e.length);C.set(e,n),this.mb.push(n),this.db.handleError(_(this.Qa,t,n,e.length,0))},n.prototype.vb=function(e,t){t??(t=this.Oa,this.Oa+=1),this.db.handleError((e===(e|0)?v:ee)(this.Qa,t,e))},n.prototype.Ib=function(e){e??(e=this.Oa,this.Oa+=1),_(this.Qa,e,0,0,0)},n.prototype.xb=function(e,t){switch(t??(t=this.Oa,this.Oa+=1),typeof e){case`string`:this.wb(e,t);return;case`number`:this.vb(e,t);return;case`bigint`:this.wb(e.toString(),t);return;case`boolean`:this.vb(e+0,t);return;case`object`:if(e===null){this.Ib(t);return}if(e.length!=null){this.Fb(e,t);return}}throw`Wrong API use : tried to bind a value of an unknown type (`+e+`).`},n.prototype.Hb=function(e){var t=this;return Object.keys(e).forEach(function(n){var r=y(t.Qa,n);r!==0&&t.xb(e[n],r)}),!0},n.prototype.Gb=function(e){for(var t=0;t<e.length;t+=1)this.xb(e[t],t+1);return!0},n.prototype.reset=function(){return this.freemem(),k(this.Qa)===0&&re(this.Qa)===0},n.prototype.freemem=function(){for(var e;(e=this.mb.pop())!==void 0;)Nt(e)},n.prototype.Ya=function(){this.freemem();var e=A(this.Qa)===0;return delete this.db.gb[this.Qa],this.Qa=0,e},r.prototype.next=function(){if(this.fb===null)return{done:!0};if(this.$a!==null&&(this.$a.Ya(),this.$a=null),!this.db.db)throw this.ob(),Error(`Database closed`);var e=Lt(),t=Q(4);pe(a),pe(t);try{this.db.handleError(h(this.db.db,this.lb,-1,a,t)),this.lb=N(t,`i32`);var r=N(a,`i32`);return r===0?(this.ob(),{done:!0}):(this.$a=new n(r,this.db),this.db.gb[r]=this.$a,{value:this.$a,done:!1})}catch(e){throw this.sb=F(this.lb),this.ob(),e}finally{It(e)}},r.prototype.ob=function(){Nt(this.fb),this.fb=null},r.prototype.Qb=function(){return this.sb===null?F(this.lb):this.sb},typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`&&(r.prototype[Symbol.iterator]=function(){return this}),i.prototype.run=function(e,t){if(!this.db)throw`Database closed`;if(t){e=this.tb(e,t);try{e.step()}finally{e.Ya()}}else this.handleError(u(this.db,e,0,0,a));return this},i.prototype.exec=function(e,t,r){if(!this.db)throw`Database closed`;var i=null,o=null,s=null;try{s=o=Et(e);var c=Q(4);for(e=[];N(s,`i8`)!==0;){pe(a),pe(c),this.handleError(h(this.db,s,-1,a,c));var l=N(a,`i32`);if(s=N(c,`i32`),l!==0){var u=null;for(i=new n(l,this),t!=null&&i.bind(t);i.step();)u===null&&(u={columns:i.qb(),values:[]},e.push(u)),u.values.push(i.get(null,r));i.Ya()}}return e}catch(e){throw i&&i.Ya(),e}finally{o&&Nt(o)}},i.prototype.Mb=function(e,t,n,r,i){typeof t==`function`&&(r=n,n=t,t=void 0),e=this.tb(e,t);try{for(;e.step();)n(e.zb(null,i))}finally{e.Ya()}if(typeof r==`function`)return r()},i.prototype.tb=function(e,t){if(pe(a),this.handleError(f(this.db,e,-1,a,0)),e=N(a,`i32`),e===0)throw`Nothing to prepare`;var r=new n(e,this);return t!=null&&r.bind(t),this.gb[e]=r},i.prototype.Ub=function(e){return new r(e,this)},i.prototype.Nb=function(){Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.handleError(l(this.db));var e=ft(this.filename);return this.handleError(c(this.filename,a)),this.db=N(a,`i32`),he(this.db),e},i.prototype.close=function(){this.db!==null&&(Object.values(this.gb).forEach(function(e){e.Ya()}),Object.values(this.Sa).forEach(Z),this.Sa={},this.Za&&=(Z(this.Za),void 0),this.handleError(l(this.db)),nt(`/`+this.filename),this.db=null)},i.prototype.handleError=function(e){if(e===0)return null;throw e=x(this.db),Error(e)},i.prototype.Rb=function(){return d(this.db)},i.prototype.Kb=function(n,r){Object.prototype.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]);var i=jt(function(n,i,a){i=t(i,a);try{var o=r.apply(null,i)}catch(e){P(n,e,-1);return}e(n,o)},`viii`);return this.Sa[n]=i,this.handleError(ie(this.db,n,r.length,1,0,i,0,0,0)),this},i.prototype.Jb=function(n,r){var i=r.init||function(){return null},a=r.finalize||function(e){return e},o=r.step;if(!o)throw`An aggregate function must have a step function in `+n;var s={};Object.hasOwnProperty.call(this.Sa,n)&&(Z(this.Sa[n]),delete this.Sa[n]),r=n+`__finalize`,Object.hasOwnProperty.call(this.Sa,r)&&(Z(this.Sa[r]),delete this.Sa[r]);var c=jt(function(e,n,r){var a=me(e,1);Object.hasOwnProperty.call(s,a)||(s[a]=i()),n=t(n,r),n=[s[a]].concat(n);try{s[a]=o.apply(null,n)}catch(t){delete s[a],P(e,t,-1)}},`viii`),l=jt(function(t){var n=me(t,1);try{var r=a(s[n])}catch(e){delete s[n],P(t,e,-1);return}e(t,r),delete s[n]},`vi`);return this.Sa[n]=c,this.Sa[r]=l,this.handleError(ie(this.db,n,o.length-1,1,0,0,c,l,0)),this},i.prototype.Zb=function(e){return this.Za&&=(_e(this.db,0,0),Z(this.Za),void 0),e?(this.Za=jt(function(t,n,r,i,a){switch(n){case 18:t=`insert`;break;case 23:t=`update`;break;case 9:t=`delete`;break;default:throw`unknown operationCode in updateHook callback: `+n}if(r=F(r),i=F(i),a>2**53-1)throw`rowId too big to fit inside a Number`;e(t,r,i,Number(a))},`viiiij`),_e(this.db,this.Za,0),this):this},n.prototype.bind=n.prototype.bind,n.prototype.step=n.prototype.step,n.prototype.get=n.prototype.get,n.prototype.getColumnNames=n.prototype.qb,n.prototype.getAsObject=n.prototype.zb,n.prototype.getSQL=n.prototype.Sb,n.prototype.getNormalizedSQL=n.prototype.Pb,n.prototype.run=n.prototype.run,n.prototype.reset=n.prototype.reset,n.prototype.freemem=n.prototype.freemem,n.prototype.free=n.prototype.Ya,r.prototype.next=r.prototype.next,r.prototype.getRemainingSQL=r.prototype.Qb,i.prototype.run=i.prototype.run,i.prototype.exec=i.prototype.exec,i.prototype.each=i.prototype.Mb,i.prototype.prepare=i.prototype.tb,i.prototype.iterateStatements=i.prototype.Ub,i.prototype.export=i.prototype.Nb,i.prototype.close=i.prototype.close,i.prototype.handleError=i.prototype.handleError,i.prototype.getRowsModified=i.prototype.Rb,i.prototype.create_function=i.prototype.Kb,i.prototype.create_aggregate=i.prototype.Jb,i.prototype.updateHook=i.prototype.Zb,s.Database=i};var d=`./this.program`,f=(e,t)=>{throw t},p=globalThis.document?.currentScript?.src;typeof __filename<`u`?p=__filename:l&&(p=self.location.href);var m=``,h,g;if(u){var _=e(`node:fs`);m=__dirname+`/`,g=e=>(e=S(e)?new URL(e):e,_.readFileSync(e)),h=async e=>(e=S(e)?new URL(e):e,_.readFileSync(e,void 0)),1<process.argv.length&&(d=process.argv[1].replace(/\\/g,`/`)),process.argv.slice(2),n!==void 0&&(n.exports=s),f=(e,t)=>{throw process.exitCode=e,t}}else if(c||l){try{m=new URL(`.`,p).href}catch{}l&&(g=e=>{var t=new XMLHttpRequest;return t.open(`GET`,e,!1),t.responseType=`arraybuffer`,t.send(null),new Uint8Array(t.response)}),h=async e=>{if(S(e))return new Promise((t,n)=>{var r=new XMLHttpRequest;r.open(`GET`,e,!0),r.responseType=`arraybuffer`,r.onload=()=>{r.status==200||r.status==0&&r.response?t(r.response):n(r.status)},r.onerror=n,r.send(null)});var t=await fetch(e,{credentials:`same-origin`});if(t.ok)return t.arrayBuffer();throw Error(t.status+` : `+t.url)}}var ee=console.log.bind(console),v=console.error.bind(console),y,b=!1,x,S=e=>e.startsWith(`file://`),C,w,T,E,D,te,ne,O;function re(){var e=Rt.buffer;C=new Int8Array(e),T=new Int16Array(e),w=new Uint8Array(e),new Uint16Array(e),E=new Int32Array(e),D=new Uint32Array(e),te=new Float32Array(e),ne=new Float64Array(e),O=new BigInt64Array(e),new BigUint64Array(e)}function k(e){throw s.onAbort?.(e),e=`Aborted(`+e+`)`,v(e),b=!0,new WebAssembly.RuntimeError(e+`. Build with -sASSERTIONS for more info.`)}var A;async function ie(e){if(!y)try{var t=await h(e);return new Uint8Array(t)}catch{}if(e==A&&y)e=new Uint8Array(y);else if(g)e=g(e);else throw`both async and sync fetching of the wasm failed`;return e}async function ae(e,t){try{var n=await ie(e);return await WebAssembly.instantiate(n,t)}catch(e){v(`failed to asynchronously prepare wasm: ${e}`),k(e)}}async function oe(e){var t=A;if(!y&&!S(t)&&!u)try{var n=fetch(t,{credentials:`same-origin`});return await WebAssembly.instantiateStreaming(n,e)}catch(e){v(`wasm streaming compile failed: ${e}`),v(`falling back to ArrayBuffer instantiation`)}return ae(t,e)}class se{name=`ExitStatus`;constructor(e){this.message=`Program terminated with exit(${e})`,this.status=e}}var ce=e=>{for(;0<e.length;)e.shift()(s)},le=[],ue=[],de=()=>{var e=s.preRun.shift();ue.push(e)},j=0,M=null;function N(e,t=`i8`){switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:return C[e];case`i8`:return C[e];case`i16`:return T[e>>1];case`i32`:return E[e>>2];case`i64`:return O[e>>3];case`float`:return te[e>>2];case`double`:return ne[e>>3];case`*`:return D[e>>2];default:k(`invalid type for getValue: ${t}`)}}var fe=!0;function pe(e){var t=`i32`;switch(t.endsWith(`*`)&&(t=`*`),t){case`i1`:C[e]=0;break;case`i8`:C[e]=0;break;case`i16`:T[e>>1]=0;break;case`i32`:E[e>>2]=0;break;case`i64`:O[e>>3]=BigInt(0);break;case`float`:te[e>>2]=0;break;case`double`:ne[e>>3]=0;break;case`*`:D[e>>2]=0;break;default:k(`invalid type for setValue: ${t}`)}}var P=new TextDecoder,me=(e,t,n,r)=>{if(n=t+n,r)return n;for(;e[t]&&!(t>=n);)++t;return t},F=(e,t,n)=>e?P.decode(w.subarray(e,me(w,e,t,n))):``,he=(e,t)=>{for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];i===`.`?e.splice(r,1):i===`..`?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift(`..`);return e},ge=e=>{var t=e.charAt(0)===`/`,n=e.slice(-1)===`/`;return(e=he(e.split(`/`).filter(e=>!!e),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},_e=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?`.`:(t&&=t.slice(0,-1),e+t)},ve=e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],ye=()=>{if(u){var t=e(`node:crypto`);return e=>t.randomFillSync(e)}return e=>crypto.getRandomValues(e)},be=e=>{(be=ye())(e)},xe=(...e)=>{for(var t=``,n=!1,r=e.length-1;-1<=r&&!n;r--){if(n=0<=r?e[r]:`/`,typeof n!=`string`)throw TypeError(`Arguments to path.resolve must be strings`);if(!n)return``;t=n+`/`+t,n=n.charAt(0)===`/`}return t=he(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`},Se=e=>{var t=me(e,0);return P.decode(e.buffer?e.subarray(0,t):new Uint8Array(e.slice(0,t)))},Ce=[],I=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);127>=r?t++:2047>=r?t+=2:55296<=r&&57343>=r?(t+=4,++n):t+=3}return t},L=(e,t,n,r)=>{if(!(0<r))return 0;var i=n;r=n+r-1;for(var a=0;a<e.length;++a){var o=e.codePointAt(a);if(127>=o){if(n>=r)break;t[n++]=o}else if(2047>=o){if(n+1>=r)break;t[n++]=192|o>>6,t[n++]=128|o&63}else if(65535>=o){if(n+2>=r)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|o&63}else{if(n+3>=r)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|o&63,a++}}return t[n]=0,n-i},we=[];function Te(e,t){we[e]={input:[],output:[],eb:t},Ye(e,Ee)}var Ee={open(e){var t=we[e.node.rdev];if(!t)throw new B(43);e.tty=t,e.seekable=!1},close(e){e.tty.eb.fsync(e.tty)},fsync(e){e.tty.eb.fsync(e.tty)},read(e,t,n,r){if(!e.tty||!e.tty.eb.Bb)throw new B(60);for(var i=0,a=0;a<r;a++){try{var o=e.tty.eb.Bb(e.tty)}catch{throw new B(29)}if(o===void 0&&i===0)throw new B(6);if(o==null)break;i++,t[n+a]=o}return i&&(e.node.atime=Date.now()),i},write(e,t,n,r){if(!e.tty||!e.tty.eb.ub)throw new B(60);try{for(var i=0;i<r;i++)e.tty.eb.ub(e.tty,t[n+i])}catch{throw new B(29)}return r&&(e.node.mtime=e.node.ctime=Date.now()),i}},De={Bb(){a:{if(!Ce.length){var e=null;if(u){var t=Buffer.alloc(256),n=0,r=process.stdin.fd;try{n=_.readSync(r,t,0,256)}catch(e){if(e.toString().includes(`EOF`))n=0;else throw e}0<n&&(e=t.slice(0,n).toString(`utf-8`))}else globalThis.window?.prompt&&(e=window.prompt(`Input: `),e!==null&&(e+=`
|
|
2
2
|
`));if(!e){e=null;break a}t=Array(I(e)+1),e=L(e,t,0,t.length),t.length=e,Ce=t}e=Ce.shift()}return e},ub(e,t){t===null||t===10?(ee(Se(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){0<e.output?.length&&(ee(Se(e.output)),e.output=[])},hc(){return{bc:25856,dc:5,ac:191,cc:35387,$b:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ic(){return 0},jc(){return[24,80]}},Oe={ub(e,t){t===null||t===10?(v(Se(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){0<e.output?.length&&(v(Se(e.output)),e.output=[])}},R={Wa:null,Xa(){return R.createNode(null,`/`,16895,0)},createNode(e,t,n,r){if((n&61440)==24576||(n&61440)==4096)throw new B(63);return R.Wa||={dir:{node:{Ta:R.La.Ta,Ua:R.La.Ua,lookup:R.La.lookup,ib:R.La.ib,rename:R.La.rename,unlink:R.La.unlink,rmdir:R.La.rmdir,readdir:R.La.readdir,symlink:R.La.symlink},stream:{Va:R.Ma.Va}},file:{node:{Ta:R.La.Ta,Ua:R.La.Ua},stream:{Va:R.Ma.Va,read:R.Ma.read,write:R.Ma.write,jb:R.Ma.jb,kb:R.Ma.kb}},link:{node:{Ta:R.La.Ta,Ua:R.La.Ua,readlink:R.La.readlink},stream:{}},yb:{node:{Ta:R.La.Ta,Ua:R.La.Ua},stream:Je}},n=Ve(e,t,n,r),U(n.mode)?(n.La=R.Wa.dir.node,n.Ma=R.Wa.dir.stream,n.Na={}):(n.mode&61440)==32768?(n.La=R.Wa.file.node,n.Ma=R.Wa.file.stream,n.Ra=0,n.Na=null):(n.mode&61440)==40960?(n.La=R.Wa.link.node,n.Ma=R.Wa.link.stream):(n.mode&61440)==8192&&(n.La=R.Wa.yb.node,n.Ma=R.Wa.yb.stream),n.atime=n.mtime=n.ctime=Date.now(),e&&(e.Na[t]=n,e.atime=e.mtime=e.ctime=n.atime),n},fc(e){return e.Na?e.Na.subarray?e.Na.subarray(0,e.Ra):new Uint8Array(e.Na):new Uint8Array},La:{Ta(e){var t={};return t.dev=(e.mode&61440)==8192?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,U(e.mode)?t.size=4096:(e.mode&61440)==32768?t.size=e.Ra:(e.mode&61440)==40960?t.size=e.link.length:t.size=0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},Ua(e,t){for(var n of[`mode`,`atime`,`mtime`,`ctime`])t[n]!=null&&(e[n]=t[n]);t.size!==void 0&&(t=t.size,e.Ra!=t&&(t==0?(e.Na=null,e.Ra=0):(n=e.Na,e.Na=new Uint8Array(t),n&&e.Na.set(n.subarray(0,Math.min(t,e.Ra))),e.Ra=t)))},lookup(){throw R.nb||(R.nb=new B(44),R.nb.stack=`<generic error, no stack>`),R.nb},ib(e,t,n,r){return R.createNode(e,t,n,r)},rename(e,t,n){try{var r=H(t,n)}catch{}if(r){if(U(e.mode))for(var i in r.Na)throw new B(55);Be(r)}delete e.parent.Na[e.name],t.Na[n]=e,e.name=n,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.Na[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){var n=H(e,t),r;for(r in n.Na)throw new B(55);delete e.Na[t],e.ctime=e.mtime=Date.now()},readdir(e){return[`.`,`..`,...Object.keys(e.Na)]},symlink(e,t,n){return e=R.createNode(e,t,41471,0),e.link=n,e},readlink(e){if((e.mode&61440)!=40960)throw new B(28);return e.link}},Ma:{read(e,t,n,r,i){var a=e.node.Na;if(i>=e.node.Ra)return 0;if(e=Math.min(e.node.Ra-i,r),8<e&&a.subarray)t.set(a.subarray(i,i+e),n);else for(r=0;r<e;r++)t[n+r]=a[i+r];return e},write(e,t,n,r,i,a){if(t.buffer===C.buffer&&(a=!1),!r)return 0;if(e=e.node,e.mtime=e.ctime=Date.now(),t.subarray&&(!e.Na||e.Na.subarray)){if(a)return e.Na=t.subarray(n,n+r),e.Ra=r;if(e.Ra===0&&i===0)return e.Na=t.slice(n,n+r),e.Ra=r;if(i+r<=e.Ra)return e.Na.set(t.subarray(n,n+r),i),r}a=i+r;var o=e.Na?e.Na.length:0;if(o>=a||(a=Math.max(a,o*(1048576>o?2:1.125)>>>0),o!=0&&(a=Math.max(a,256)),o=e.Na,e.Na=new Uint8Array(a),0<e.Ra&&e.Na.set(o.subarray(0,e.Ra),0)),e.Na.subarray&&t.subarray)e.Na.set(t.subarray(n,n+r),i);else for(a=0;a<r;a++)e.Na[i+a]=t[n+a];return e.Ra=Math.max(e.Ra,i+r),r},Va(e,t,n){if(n===1?t+=e.position:n===2&&(e.node.mode&61440)==32768&&(t+=e.node.Ra),0>t)throw new B(28);return t},jb(e,t,n,r,i){if((e.node.mode&61440)!=32768)throw new B(43);if(e=e.node.Na,i&2||!e||e.buffer!==C.buffer){i=!0,r=65536*Math.ceil(t/65536);var a=Pt(65536,r);if(a&&w.fill(0,a,a+r),r=a,!r)throw new B(48);e&&((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),C.set(e,r))}else i=!1,r=e.byteOffset;return{Xb:r,Eb:i}},kb(e,t,n,r){return R.Ma.write(e,t,0,r,n,!1),0}}},ke=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},Ae=null,je={},Me=[],Ne=1,z=null,Pe=!1,Fe=!0,B=class{name=`ErrnoError`;constructor(e){this.Pa=e}},Ie=class{hb={};node=null;get flags(){return this.hb.flags}set flags(e){this.hb.flags=e}get position(){return this.hb.position}set position(e){this.hb.position=e}},Le=class{La={};Ma={};bb=null;constructor(e,t,n,r){e||=this,this.parent=e,this.Xa=e.Xa,this.id=Ne++,this.name=t,this.mode=n,this.rdev=r,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)==365}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)==146}set write(e){e?this.mode|=146:this.mode&=-147}};function V(e,t={}){if(!e)throw new B(44);t.pb??=!0,e.charAt(0)===`/`||(e=`//`+e);var n=0;a:for(;40>n;n++){e=e.split(`/`).filter(e=>!!e);for(var r=Ae,i=`/`,a=0;a<e.length;a++){var o=a===e.length-1;if(o&&t.parent)break;if(e[a]!==`.`)if(e[a]===`..`)if(i=_e(i),r===r.parent){e=i+`/`+e.slice(a+1).join(`/`),n--;continue a}else r=r.parent;else{i=ge(i+`/`+e[a]);try{r=H(r,e[a])}catch(e){if(e?.Pa===44&&o&&t.Wb)return{path:i};throw e}if(!r.bb||o&&!t.pb||(r=r.bb.root),(r.mode&61440)==40960&&(!o||t.ab)){if(!r.La.readlink)throw new B(52);r=r.La.readlink(r),r.charAt(0)===`/`||(r=_e(i)+`/`+r),e=r+`/`+e.slice(a+1).join(`/`);continue a}}}return{path:i,node:r}}throw new B(32)}function Re(e){for(var t;;){if(e===e.parent)return e=e.Xa.Db,t?e[e.length-1]===`/`?e+t:`${e}/${t}`:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function ze(e,t){for(var n=0,r=0;r<t.length;r++)n=(n<<5)-n+t.charCodeAt(r)|0;return(e+n>>>0)%z.length}function Be(e){var t=ze(e.parent.id,e.name);if(z[t]===e)z[t]=e.cb;else for(t=z[t];t;){if(t.cb===e){t.cb=e.cb;break}t=t.cb}}function H(e,t){var n=U(e.mode)?(n=W(e,`x`))?n:e.La.lookup?0:2:54;if(n)throw new B(n);for(n=z[ze(e.id,t)];n;n=n.cb){var r=n.name;if(n.parent.id===e.id&&r===t)return n}return e.La.lookup(e,t)}function Ve(e,t,n,r){return e=new Le(e,t,n,r),t=ze(e.parent.id,e.name),e.cb=z[t],z[t]=e}function U(e){return(e&61440)==16384}function W(e,t){return Fe?0:t.includes(`r`)&&!(e.mode&292)||t.includes(`w`)&&!(e.mode&146)||t.includes(`x`)&&!(e.mode&73)?2:0}function He(e,t){if(!U(e.mode))return 54;try{return H(e,t),20}catch{}return W(e,`wx`)}function Ue(e,t,n){try{var r=H(e,t)}catch(e){return e.Pa}if(e=W(e,`wx`))return e;if(n){if(!U(r.mode))return 54;if(r===r.parent||Re(r)===`/`)return 10}else if(U(r.mode))return 31;return 0}function We(e){if(!e)throw new B(63);return e}function G(e){if(e=Me[e],!e)throw new B(8);return e}function Ge(e,t=-1){if(e=Object.assign(new Ie,e),t==-1)a:{for(t=0;4096>=t;t++)if(!Me[t])break a;throw new B(33)}return e.fd=t,Me[t]=e}function Ke(e,t=-1){return e=Ge(e,t),e.Ma?.ec?.(e),e}function qe(e,t,n){var r=e?.Ma.Ua;e=r?e:t,r??=t.La.Ua,We(r),r(e,n)}var Je={open(e){e.Ma=je[e.node.rdev].Ma,e.Ma.open?.(e)},Va(){throw new B(70)}};function Ye(e,t){je[e]={Ma:t}}function Xe(e,t){var n=t===`/`;if(n&&Ae)throw new B(10);if(!n&&t){var r=V(t,{pb:!1});if(t=r.path,r=r.node,r.bb)throw new B(10);if(!U(r.mode))throw new B(54)}t={type:e,kc:{},Db:t,Vb:[]},e=e.Xa(t),e.Xa=t,t.root=e,n?Ae=e:r&&(r.bb=t,r.Xa&&r.Xa.Vb.push(t))}function Ze(e,t,n){var r=V(e,{parent:!0}).node;if(e=ve(e),!e)throw new B(28);if(e===`.`||e===`..`)throw new B(20);var i=He(r,e);if(i)throw new B(i);if(!r.La.ib)throw new B(63);return r.La.ib(r,e,t,n)}function Qe(e,t=438){return Ze(e,t&4095|32768,0)}function K(e,t=511){return Ze(e,t&1023|16384,0)}function $e(e,t,n){n===void 0&&(n=t,t=438),Ze(e,t|8192,n)}function et(e,t){if(!xe(e))throw new B(44);var n=V(t,{parent:!0}).node;if(!n)throw new B(44);t=ve(t);var r=He(n,t);if(r)throw new B(r);if(!n.La.symlink)throw new B(63);n.La.symlink(n,t,e)}function tt(e){var t=V(e,{parent:!0}).node;e=ve(e);var n=H(t,e),r=Ue(t,e,!0);if(r)throw new B(r);if(!t.La.rmdir)throw new B(63);if(n.bb)throw new B(10);t.La.rmdir(t,e),Be(n)}function nt(e){var t=V(e,{parent:!0}).node;if(!t)throw new B(44);e=ve(e);var n=H(t,e),r=Ue(t,e,!1);if(r)throw new B(r);if(!t.La.unlink)throw new B(63);if(n.bb)throw new B(10);t.La.unlink(t,e),Be(n)}function rt(e,t){return e=V(e,{ab:!t}).node,We(e.La.Ta)(e)}function it(e,t,n,r){qe(e,t,{mode:n&4095|t.mode&-4096,ctime:Date.now(),Lb:r})}function at(e,t){e=typeof e==`string`?V(e,{ab:!0}).node:e,it(null,e,t)}function ot(e,t,n){if(U(t.mode))throw new B(31);if((t.mode&61440)!=32768)throw new B(28);var r=W(t,`w`);if(r)throw new B(r);qe(e,t,{size:n,timestamp:Date.now()})}function st(e,t,n=438){if(e===``)throw new B(44);if(typeof t==`string`){var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(r===void 0)throw Error(`Unknown file open mode: ${t}`);t=r}if(n=t&64?n&4095|32768:0,typeof e==`object`)r=e;else{var i=e.endsWith(`/`),a=V(e,{ab:!(t&131072),Wb:!0});r=a.node,e=a.path}if(a=!1,t&64)if(r){if(t&128)throw new B(20)}else{if(i)throw new B(31);r=Ze(e,n|511,0),a=!0}if(!r)throw new B(44);if((r.mode&61440)==8192&&(t&=-513),t&65536&&!U(r.mode))throw new B(54);if(!a&&(r?(r.mode&61440)==40960?i=32:(i=[`r`,`w`,`rw`][t&3],t&512&&(i+=`w`),i=U(r.mode)&&(i!==`r`||t&576)?31:W(r,i)):i=44,i))throw new B(i);return t&512&&!a&&(i=r,i=typeof i==`string`?V(i,{ab:!0}).node:i,ot(null,i,0)),t=Ge({node:r,path:Re(r),flags:t&-131713,seekable:!0,position:0,Ma:r.Ma,Yb:[],error:!1}),t.Ma.open&&t.Ma.open(t),a&&at(r,n&511),t}function ct(e){if(e.fd===null)throw new B(8);e.rb&&=null;try{e.Ma.close&&e.Ma.close(e)}catch(e){throw e}finally{Me[e.fd]=null}e.fd=null}function lt(e,t,n){if(e.fd===null)throw new B(8);if(!e.seekable||!e.Ma.Va)throw new B(70);if(n!=0&&n!=1&&n!=2)throw new B(28);e.position=e.Ma.Va(e,t,n),e.Yb=[]}function ut(e,t,n,r,i){if(0>r||0>i)throw new B(28);if(e.fd===null||(e.flags&2097155)==1)throw new B(8);if(U(e.node.mode))throw new B(31);if(!e.Ma.read)throw new B(28);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new B(70);return t=e.Ma.read(e,t,n,r,i),a||(e.position+=t),t}function dt(e,t,n,r,i){if(0>r||0>i)throw new B(28);if(e.fd===null||!(e.flags&2097155))throw new B(8);if(U(e.node.mode))throw new B(31);if(!e.Ma.write)throw new B(28);e.seekable&&e.flags&1024&<(e,0,2);var a=i!==void 0;if(!a)i=e.position;else if(!e.seekable)throw new B(70);return t=e.Ma.write(e,t,n,r,i,void 0),a||(e.position+=t),t}function ft(e){var t=t||0,n=`binary`;n!==`utf8`&&n!==`binary`&&k(`Invalid encoding type "${n}"`),t=st(e,t),e=rt(e).size;var r=new Uint8Array(e);return ut(t,r,0,e,0),n===`utf8`&&(r=Se(r)),ct(t),r}function q(e,t,n){e=ge(`/dev/`+e);var r=ke(!!t,!!n);q.Cb??=64;var i=q.Cb++<<8|0;Ye(i,{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,n,r,i){for(var a=0,o=0;o<i;o++){try{var s=t()}catch{throw new B(29)}if(s===void 0&&a===0)throw new B(6);if(s==null)break;a++,n[r+o]=s}return a&&(e.node.atime=Date.now()),a},write(e,t,r,i){for(var a=0;a<i;a++)try{n(t[r+a])}catch{throw new B(29)}return i&&(e.node.mtime=e.node.ctime=Date.now()),a}}),$e(e,r,i)}var J={};function Y(e,t,n){if(t.charAt(0)===`/`)return t;if(e=e===-100?`/`:G(e).path,t.length==0){if(!n)throw new B(44);return e}return e+`/`+t}function pt(e,t){D[e>>2]=t.dev,D[e+4>>2]=t.mode,D[e+8>>2]=t.nlink,D[e+12>>2]=t.uid,D[e+16>>2]=t.gid,D[e+20>>2]=t.rdev,O[e+24>>3]=BigInt(t.size),E[e+32>>2]=4096,E[e+36>>2]=t.blocks;var n=t.atime.getTime(),r=t.mtime.getTime(),i=t.ctime.getTime();return O[e+40>>3]=BigInt(Math.floor(n/1e3)),D[e+48>>2]=n%1e3*1e6,O[e+56>>3]=BigInt(Math.floor(r/1e3)),D[e+64>>2]=r%1e3*1e6,O[e+72>>3]=BigInt(Math.floor(i/1e3)),D[e+80>>2]=i%1e3*1e6,O[e+88>>3]=BigInt(t.ino),0}var mt=void 0,ht=()=>{var e=E[mt>>2];return mt+=4,e},gt=0,_t=[0,31,60,91,121,152,182,213,244,274,305,335],vt=[0,31,59,90,120,151,181,212,243,273,304,334],yt={},bt=e=>{x=e,fe||0<gt||(s.onExit?.(e),b=!0),f(e,new se(e))},xt=e=>{if(!b)try{e()}catch(e){e instanceof se||e==`unwind`||f(1,e)}finally{if(!(fe||0<gt))try{x=e=x,bt(e)}catch(e){e instanceof se||e==`unwind`||f(1,e)}}},St={},Ct=()=>{if(!wt){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:d||`./this.program`},t;for(t in St)St[t]===void 0?delete e[t]:e[t]=St[t];var n=[];for(t in e)n.push(`${t}=${e[t]}`);wt=n}return wt},wt,Tt=(e,t,n,r)=>{var i={string:e=>{var t=0;if(e!=null&&e!==0){t=I(e)+1;var n=Q(t);L(e,w,n,t),t=n}return t},array:e=>{var t=Q(e.length);return C.set(e,t),t}};e=s[`_`+e];var a=[],o=0;if(r)for(var c=0;c<r.length;c++){var l=i[n[c]];l?(o===0&&(o=Lt()),a[c]=l(r[c])):a[c]=r[c]}return n=e(...a),n=function(e){return o!==0&&It(o),t===`string`?F(e):t===`boolean`?!!e:e}(n)},Et=e=>{var t=I(e)+1,n=Mt(t);return n&&L(e,w,n,t),n},X,Dt=[],Z=e=>{X.delete($.get(e)),$.set(e,null),Dt.push(e)},Ot=e=>{let t=e.length;return[t%128|128,t>>7,...e]},kt={i:127,p:127,j:126,f:125,d:124,e:111},At=e=>Ot(Array.from(e,e=>kt[e])),jt=(e,t)=>{if(!X){X=new WeakMap;var n=$.length;if(X)for(var r=0;r<0+n;r++){var i=$.get(r);i&&X.set(i,r)}}if(n=X.get(e)||0)return n;n=Dt.length?Dt.pop():$.grow(1);try{$.set(n,e)}catch(r){if(!(r instanceof TypeError))throw r;t=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Ot([1,96,...At(t.slice(1)),...At(t[0]===`v`?``:t[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),t=new WebAssembly.Module(t),t=new WebAssembly.Instance(t,{e:{f:e}}).exports.f,$.set(n,t)}return X.set(e,n),n};if(z=Array(4096),Xe(R,`/`),K(`/tmp`),K(`/home`),K(`/home/web_user`),(function(){K(`/dev`),Ye(259,{read:()=>0,write:(e,t,n,r)=>r,Va:()=>0}),$e(`/dev/null`,259),Te(1280,De),Te(1536,Oe),$e(`/dev/tty`,1280),$e(`/dev/tty1`,1536);var e=new Uint8Array(1024),t=0,n=()=>(t===0&&(be(e),t=e.byteLength),e[--t]);q(`random`,n),q(`urandom`,n),K(`/dev/shm`),K(`/dev/shm/tmp`)})(),(function(){K(`/proc`);var e=K(`/proc/self`);K(`/proc/self/fd`),Xe({Xa(){var t=Ve(e,`fd`,16895,73);return t.Ma={Va:R.Ma.Va},t.La={lookup(e,t){e=+t;var n=G(e);return e={parent:null,Xa:{Db:`fake`},La:{readlink:()=>n.path},id:e+1},e.parent=e},readdir(){return Array.from(Me.entries()).filter(([,e])=>e).map(([e])=>e.toString())}},t}},`/proc/self/fd`)})(),s.noExitRuntime&&(fe=s.noExitRuntime),s.print&&(ee=s.print),s.printErr&&(v=s.printErr),s.wasmBinary&&(y=s.wasmBinary),s.thisProgram&&(d=s.thisProgram),s.preInit)for(typeof s.preInit==`function`&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.shift()();s.stackSave=()=>Lt(),s.stackRestore=e=>It(e),s.stackAlloc=e=>Q(e),s.cwrap=(e,t,n,r)=>{var i=!n||n.every(e=>e===`number`||e===`boolean`);return t!==`string`&&i&&!r?s[`_`+e]:(...r)=>Tt(e,t,n,r)},s.addFunction=jt,s.removeFunction=Z,s.UTF8ToString=F,s.stringToNewUTF8=Et,s.writeArrayToMemory=(e,t)=>{C.set(e,t)};var Mt,Nt,Pt,Ft,It,Q,Lt,Rt,$,zt={a:(e,t,n,r)=>k(`Assertion failed: ${F(e)}, at: `+[t?F(t):`unknown filename`,n,r?F(r):`unknown function`]),i:function(e,t){try{return e=F(e),at(e,t),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},L:function(e,t,n){try{if(t=F(t),t=Y(e,t),n&-8)return-28;var r=V(t,{ab:!0}).node;return r?(e=``,n&4&&(e+=`r`),n&2&&(e+=`w`),n&1&&(e+=`x`),e&&W(r,e)?-2:0):-44}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},j:function(e,t){try{var n=G(e);return it(n,n.node,t,!1),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},h:function(e){try{var t=G(e);return qe(t,t.node,{timestamp:Date.now(),Lb:!1}),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},b:function(e,t,n){mt=n;try{var r=G(e);switch(t){case 0:var i=ht();if(0>i)break;for(;Me[i];)i++;return Ke(r,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:return i=ht(),r.flags|=i,0;case 12:return i=ht(),T[i+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},g:function(e,t){try{var n=G(e),r=n.node,i=n.Ma.Ta;return e=i?n:r,i??=r.La.Ta,We(i),pt(t,i(e))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},H:function(e,t){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t);try{if(isNaN(t))return-61;var n=G(e);if(0>t||!(n.flags&2097155))throw new B(28);return ot(n,n.node,t),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},G:function(e,t){try{if(t===0)return-28;var n=I(`/`)+1;return t<n?-68:(L(`/`,w,e,t),n)}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},K:function(e,t){try{return e=F(e),pt(t,rt(e,!0))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},C:function(e,t,n){try{return t=F(t),t=Y(e,t),K(t,n),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},J:function(e,t,n,r){try{t=F(t);var i=r&256;return t=Y(e,t,r&4096),pt(n,i?rt(t,!0):rt(t))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},x:function(e,t,n,r){mt=r;try{t=F(t),t=Y(e,t);var i=r?ht():0;return st(t,n,i).fd}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},v:function(e,t,n,r){try{if(t=F(t),t=Y(e,t),0>=r)return-28;var i=V(t).node;if(!i)throw new B(44);if(!i.La.readlink)throw new B(28);var a=i.La.readlink(i),o=Math.min(r,I(a)),s=C[n+o];return L(a,w,n,r+1),C[n+o]=s,o}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},u:function(e){try{return e=F(e),tt(e),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},f:function(e,t){try{return e=F(e),pt(t,rt(e))}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},r:function(e,t,n){try{if(t=F(t),t=Y(e,t),n)if(n===512)tt(t);else return-28;else nt(t);return 0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},q:function(e,t,n){try{t=F(t),t=Y(e,t,!0);var r=Date.now(),i,a;if(n){var o=D[n>>2]+4294967296*E[n+4>>2],s=E[n+8>>2];i=s==1073741823?r:s==1073741822?null:1e3*o+s/1e6,n+=16,o=D[n>>2]+4294967296*E[n+4>>2],s=E[n+8>>2],a=s==1073741823?r:s==1073741822?null:1e3*o+s/1e6}else a=i=r;if((a??i)!==null){e=i;var c=V(t,{ab:!0}).node;We(c.La.Ua)(c,{atime:e,mtime:a})}return 0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},m:()=>k(``),l:()=>{fe=!1,gt=0},A:function(e,t){e=-9007199254740992>e||9007199254740992<e?NaN:Number(e),e=new Date(1e3*e),E[t>>2]=e.getSeconds(),E[t+4>>2]=e.getMinutes(),E[t+8>>2]=e.getHours(),E[t+12>>2]=e.getDate(),E[t+16>>2]=e.getMonth(),E[t+20>>2]=e.getFullYear()-1900,E[t+24>>2]=e.getDay();var n=e.getFullYear();E[t+28>>2]=(n%4!=0||n%100==0&&n%400!=0?vt:_t)[e.getMonth()]+e.getDate()-1|0,E[t+36>>2]=-(60*e.getTimezoneOffset()),n=new Date(e.getFullYear(),6,1).getTimezoneOffset();var r=new Date(e.getFullYear(),0,1).getTimezoneOffset();E[t+32>>2]=(n!=r&&e.getTimezoneOffset()==Math.min(r,n))|0},y:function(e,t,n,r,i,a,o){i=-9007199254740992>i||9007199254740992<i?NaN:Number(i);try{var s=G(r);if(t&2&&!(n&2)&&(s.flags&2097155)!=2||(s.flags&2097155)==1)throw new B(2);if(!s.Ma.jb)throw new B(43);if(!e)throw new B(28);var c=s.Ma.jb(s,e,i,t,n),l=c.Xb;return E[a>>2]=c.Eb,D[o>>2]=l,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},z:function(e,t,n,r,i,a){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);try{var o=G(i);if(n&2){if(n=a,(o.node.mode&61440)!=32768)throw new B(43);if(!(r&2)){var s=w.slice(e,e+t);o.Ma.kb&&o.Ma.kb(o,s,n,t,r)}}}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return-e.Pa}},n:(e,t)=>(yt[e]&&(clearTimeout(yt[e].id),delete yt[e]),t&&(yt[e]={id:setTimeout(()=>{delete yt[e],xt(()=>Ft(e,performance.now()))},t),lc:t}),0),B:(e,t,n,r)=>{var i=new Date().getFullYear(),a=new Date(i,0,1).getTimezoneOffset();i=new Date(i,6,1).getTimezoneOffset(),D[e>>2]=60*Math.max(a,i),E[t>>2]=Number(a!=i),t=e=>{var t=Math.abs(e);return`UTC${0<=e?`-`:`+`}${String(Math.floor(t/60)).padStart(2,`0`)}${String(t%60).padStart(2,`0`)}`},e=t(a),t=t(i),i<a?(L(e,w,n,17),L(t,w,r,17)):(L(e,w,r,17),L(t,w,n,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:e=>{var t=w.length;if(e>>>=0,2147483648<e)return!1;for(var n=1;4>=n;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+100663296);a:{r=(Math.min(2147483648,65536*Math.ceil(Math.max(e,r)/65536))-Rt.buffer.byteLength+65535)/65536|0;try{Rt.grow(r),re();var i=1;break a}catch{}i=void 0}if(i)return!0}return!1},E:(e,t)=>{var n=0,r=0,i;for(i of Ct()){var a=t+n;D[e+r>>2]=a,n+=L(i,w,a,1/0)+1,r+=4}return 0},F:(e,t)=>{var n=Ct();D[e>>2]=n.length,e=0;for(var r of n)e+=I(r)+1;return D[t>>2]=e,0},e:function(e){try{return ct(G(e)),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},p:function(e,t){try{var n=G(e);return C[t]=n.tty?2:U(n.mode)?3:(n.mode&61440)==40960?7:4,T[t+2>>1]=0,O[t+8>>3]=BigInt(0),O[t+16>>3]=BigInt(0),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},w:function(e,t,n,r){try{a:{var i=G(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=ut(i,C,s,c,a);if(0>l){var u=-1;break a}if(t+=l,l<c)break;a!==void 0&&(a+=l)}u=t}return D[r>>2]=u,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},D:function(e,t,n,r){t=-9007199254740992>t||9007199254740992<t?NaN:Number(t);try{if(isNaN(t))return 61;var i=G(e);return lt(i,t,n),O[r>>3]=BigInt(i.position),i.rb&&t===0&&n===0&&(i.rb=null),0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},I:function(e){try{var t=G(e);return t.Ma?.fsync?.(t)}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},t:function(e,t,n,r){try{a:{var i=G(e);e=t;for(var a,o=t=0;o<n;o++){var s=D[e>>2],c=D[e+4>>2];e+=8;var l=dt(i,C,s,c,a);if(0>l){var u=-1;break a}if(t+=l,l<c)break;a!==void 0&&(a+=l)}u=t}return D[r>>2]=u,0}catch(e){if(J===void 0||e.name!==`ErrnoError`)throw e;return e.Pa}},k:bt};function Bt(){function e(){if(s.calledRun=!0,!b){if(!s.noFSInit&&!Pe){var e,t;Pe=!0,e??=s.stdin,t??=s.stdout,n??=s.stderr,e?q(`stdin`,e):et(`/dev/tty`,`/dev/stdin`),t?q(`stdout`,null,t):et(`/dev/tty`,`/dev/stdout`),n?q(`stderr`,null,n):et(`/dev/tty1`,`/dev/stderr`),st(`/dev/stdin`,0),st(`/dev/stdout`,1),st(`/dev/stderr`,1)}if(Vt.N(),Fe=!1,s.onRuntimeInitialized?.(),s.postRun)for(typeof s.postRun==`function`&&(s.postRun=[s.postRun]);s.postRun.length;){var n=s.postRun.shift();le.push(n)}ce(le)}}if(0<j)M=Bt;else{if(s.preRun)for(typeof s.preRun==`function`&&(s.preRun=[s.preRun]);s.preRun.length;)de();ce(ue),0<j?M=Bt:s.setStatus?(s.setStatus(`Running...`),setTimeout(()=>{setTimeout(()=>s.setStatus(``),1),e()},1)):e()}}var Vt;return(async function(){function e(e){return e=Vt=e.exports,s._sqlite3_free=e.P,s._sqlite3_value_text=e.Q,s._sqlite3_prepare_v2=e.R,s._sqlite3_step=e.S,s._sqlite3_reset=e.T,s._sqlite3_exec=e.U,s._sqlite3_finalize=e.V,s._sqlite3_column_name=e.W,s._sqlite3_column_text=e.X,s._sqlite3_column_type=e.Y,s._sqlite3_errmsg=e.Z,s._sqlite3_clear_bindings=e._,s._sqlite3_value_blob=e.$,s._sqlite3_value_bytes=e.aa,s._sqlite3_value_double=e.ba,s._sqlite3_value_int=e.ca,s._sqlite3_value_type=e.da,s._sqlite3_result_blob=e.ea,s._sqlite3_result_double=e.fa,s._sqlite3_result_error=e.ga,s._sqlite3_result_int=e.ha,s._sqlite3_result_int64=e.ia,s._sqlite3_result_null=e.ja,s._sqlite3_result_text=e.ka,s._sqlite3_aggregate_context=e.la,s._sqlite3_column_count=e.ma,s._sqlite3_data_count=e.na,s._sqlite3_column_blob=e.oa,s._sqlite3_column_bytes=e.pa,s._sqlite3_column_double=e.qa,s._sqlite3_bind_blob=e.ra,s._sqlite3_bind_double=e.sa,s._sqlite3_bind_int=e.ta,s._sqlite3_bind_text=e.ua,s._sqlite3_bind_parameter_index=e.va,s._sqlite3_sql=e.wa,s._sqlite3_normalized_sql=e.xa,s._sqlite3_changes=e.ya,s._sqlite3_close_v2=e.za,s._sqlite3_create_function_v2=e.Aa,s._sqlite3_update_hook=e.Ba,s._sqlite3_open=e.Ca,Mt=s._malloc=e.Da,Nt=s._free=e.Ea,s._RegisterExtensionFunctions=e.Fa,Pt=e.Ga,Ft=e.Ha,It=e.Ia,Q=e.Ja,Lt=e.Ka,Rt=e.M,$=e.O,re(),j--,s.monitorRunDependencies?.(j),j==0&&M&&(e=M,M=null,e()),Vt}j++,s.monitorRunDependencies?.(j);var t={a:zt};return s.instantiateWasm?new Promise(n=>{s.instantiateWasm(t,(t,r)=>{n(e(t,r))})}):(A??=s.locateFile?s.locateFile(`sql-wasm.wasm`,m):m+`sql-wasm.wasm`,e((await oe(t)).instance))})(),Bt(),a}),r)};typeof t==`object`&&typeof n==`object`?(n.exports=i,n.exports.default=i):typeof define==`function`&&define.amd?define([],function(){return i}):typeof t==`object`&&(t.Module=i)}))(),1);function ee(e,t,n){switch(n.mode){case`list`:return y(e,t,n);case`csv`:return b(e,t,n);case`json`:return w(e,t);case`line`:return T(e,t,n);case`column`:return E(e,t,n);case`table`:return D(e,t,n);case`markdown`:return te(e,t,n);case`tabs`:return ne(e,t,n);case`box`:return O(e,t,n);case`quote`:return re(e,t,n);case`html`:return k(e,t,n);case`ascii`:return ie(e,t,n)}}function v(e,t){return e==null?t:e instanceof Uint8Array||Buffer.isBuffer(e)?Buffer.from(e).toString(`utf8`):typeof e==`number`&&!Number.isInteger(e)?e.toPrecision(17).replace(/\.?0+$/,``):String(e)}function y(e,t,n){let r=[];n.header&&e.length>0&&r.push(e.join(n.separator));for(let e of t)r.push(e.map(e=>v(e,n.nullValue)).join(n.separator));return r.length>0?`${r.join(n.newline)}${n.newline}`:``}function b(e,t,n){let r=[];n.header&&e.length>0&&r.push(e.map(x).join(`,`));for(let e of t)r.push(e.map(e=>x(v(e,n.nullValue))).join(`,`));return r.length>0?`${r.join(`
|
|
3
3
|
`)}
|
|
4
4
|
`:``}function x(e){return e.includes(`,`)||e.includes(`"`)||e.includes(`'`)||e.includes(`
|
|
@@ -23,7 +23,7 @@ import{a as e,s as t,t as n}from"./chunk-C94x7I9S.mjs";import{t as r}from"./chun
|
|
|
23
23
|
`,exitCode:1};t.nullValue=e[++o]}else if(s===`-cmd`){if(o+1>=e.length)return{stdout:``,stderr:`sqlite3: Error: missing argument to -cmd
|
|
24
24
|
`,exitCode:1};t.cmd=e[++o]}else{if(s.startsWith(`-`))return{stdout:``,stderr:`sqlite3: Error: unknown option: ${s.startsWith(`--`)?s.slice(1):s}
|
|
25
25
|
Use -help for a list of options.
|
|
26
|
-
`,exitCode:1};n===null?n=s:r===null&&(r=s)}}return{options:t,database:n,sql:r,showVersion:i}}async function ce(){let e=new(await(r.runTrustedAsync(()=>(0,_.default)()))).Database;try{let t=e.exec(`SELECT sqlite_version()`);return t.length>0&&t[0].values.length>0?String(t[0].values[0][0]):`unknown`}finally{e.close()}}function le(){let e=d(
|
|
26
|
+
`,exitCode:1};n===null?n=s:r===null&&(r=s)}}return{options:t,database:n,sql:r,showVersion:i}}async function ce(){let e=new(await(r.runTrustedAsync(()=>(0,_.default)()))).Database;try{let t=e.exec(`SELECT sqlite_version()`);return t.length>0&&t[0].values.length>0?String(t[0].values[0][0]):`unknown`}finally{e.close()}}function le(){let e=d(m(import.meta.url)),t=f(e,`../../commands/sqlite3/worker.js`);if(p(t))return t;let n=f(e,`worker.js`);if(p(n))return n;let r=f(e,`../../../dist/commands/sqlite3/worker.js`);if(p(r))return r;throw Error(`sqlite3 worker not found. Run 'pnpm build' to compile the worker.`)}var ue={createWorker(e,t){return new g(e,{workerData:t})}};function de(){return h(16).toString(`hex`)}function j(e,t){if(!e||typeof e!=`object`)return{success:!1,error:`Malformed worker response`};let n=e;return typeof n.protocolToken!=`string`||n.protocolToken!==t?{success:!1,error:`Malformed worker response: invalid protocol token`}:n.type===`security-violation`?{success:!1,error:`Security violation: ${typeof n.violation?.type==`string`?n.violation.type:`unknown`}`}:typeof n.success==`boolean`?n.success?Array.isArray(n.results)?typeof n.hasModifications==`boolean`?n.dbBuffer!==null&&n.dbBuffer!==void 0&&!(n.dbBuffer instanceof Uint8Array)?{success:!1,error:`Malformed worker response: invalid dbBuffer`}:{success:!0,results:n.results,hasModifications:n.hasModifications,dbBuffer:n.dbBuffer===void 0?null:n.dbBuffer,defenseStats:n.defenseStats}:{success:!1,error:`Malformed worker response: missing hasModifications flag`}:{success:!1,error:`Malformed worker response: missing results array`}:{success:!1,error:typeof n.error==`string`&&n.error.length>0?n.error:`Worker execution failed`}:{success:!1,error:`Malformed worker response: missing success flag`}}async function M(e,t,n){try{let s=le();return await new Promise((l,u)=>{let d=r.runTrusted(()=>ue.createWorker(s,e)),f=o(n,`sqlite3`,`worker timeout callback`,()=>{d.terminate(),l({success:!1,error:`Query timeout: execution exceeded ${t}ms limit`})}),p=a(()=>{try{f()}catch(e){l({success:!1,error:c(e instanceof Error?e.message:String(e))})}},t),m=o(n,`sqlite3`,`worker message callback`,t=>{i(p),l(j(t,e.protocolToken))}),h=o(n,`sqlite3`,`worker error callback`,e=>{i(p),u(e)}),g=o(n,`sqlite3`,`worker exit callback`,e=>{i(p),e!==0&&l({success:!1,error:`Worker exited with code ${e}`})});d.on(`message`,e=>{try{m(e)}catch(e){i(p),l({success:!1,error:c(e instanceof Error?e.message:String(e))})}}),d.on(`error`,e=>{try{h(e)}catch(e){i(p);let t=e instanceof Error?e.message:String(e);u(Error(c(t)))}}),d.on(`exit`,e=>{try{g(e)}catch(e){i(p),l({success:!1,error:c(e instanceof Error?e.message:String(e))})}})})}catch(e){let t=c(e.message);throw Error(`sqlite3 worker failed to load: ${t}`)}}var N={name:`sqlite3`,async execute(e,t){if(u(e)||e.includes(`-help`))return l(oe);let n=se(e);if(`exitCode`in n)return n;let{options:r,database:i,sql:a,showVersion:o}=n;if(o)return{stdout:`${await ce()}
|
|
27
27
|
`,stderr:``,exitCode:0};if(!i)return{stdout:``,stderr:`sqlite3: missing database argument
|
|
28
28
|
`,exitCode:1};let d=a||t.stdin.trim();if(r.cmd&&(d=r.cmd+(d?`; ${d}`:``)),!d)return{stdout:``,stderr:`sqlite3: no SQL provided
|
|
29
29
|
`,exitCode:1};let f=i===`:memory:`,p=``,m=null;try{f||(p=t.fs.resolvePath(t.cwd,i),await t.fs.exists(p)&&(m=await t.fs.readFileBuffer(p)))}catch(e){return{stdout:``,stderr:`sqlite3: unable to open database "${i}": ${s(e.message)}
|
|
@@ -34,4 +34,4 @@ Use -help for a list of options.
|
|
|
34
34
|
`,exitCode:1};y+=`Error: ${e.error}
|
|
35
35
|
`,b=!0}else e.columns&&e.rows&&(e.rows.length>0||r.header)&&(y+=ee(e.columns,e.rows,v));if(_.hasModifications&&!r.readonly&&!f&&p&&_.dbBuffer)try{await t.fs.writeFile(p,_.dbBuffer)}catch(e){let t=s(e.message);return{stdout:y,stderr:`sqlite3: failed to write database: ${t}
|
|
36
36
|
`,exitCode:1}}return{stdout:y,stderr:``,exitCode:b&&r.bail?1:0}}},fe={name:`sqlite3`,flags:[],needsArgs:!0};export{ue as n,fe as r,N as t};
|
|
37
|
-
//# sourceMappingURL=chunk-HWBSOZZR-
|
|
37
|
+
//# sourceMappingURL=chunk-HWBSOZZR-DQTTl_pa.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./chunk-R6VWJ2ZL-
|
|
1
|
+
import{t as e}from"./chunk-R6VWJ2ZL-BVeTwIsz.mjs";import{i as t,n}from"./chunk-CWQS3NFK-BkE4vqrf.mjs";import{n as r,t as i}from"./chunk-A5O5YHGN-DApqA6Ow.mjs";import{t as a}from"./chunk-IPJHKYVM-CUKythEA.mjs";import{n as o}from"./chunk-3THT3N7L-B1WzJUh4.mjs";var s={NOOP:0,READ_FILE:1,WRITE_FILE:2,STAT:3,READDIR:4,MKDIR:5,RM:6,EXISTS:7,APPEND_FILE:8,SYMLINK:9,READLINK:10,LSTAT:11,CHMOD:12,REALPATH:13,RENAME:14,COPY_FILE:15,WRITE_STDOUT:100,WRITE_STDERR:101,EXIT:102,HTTP_REQUEST:200,EXEC_COMMAND:300},c={PENDING:0,READY:1,SUCCESS:2,ERROR:3},l={NONE:0,NOT_FOUND:1,IS_DIRECTORY:2,NOT_DIRECTORY:3,EXISTS:4,PERMISSION_DENIED:5,INVALID_PATH:6,IO_ERROR:7,TIMEOUT:8,NETWORK_ERROR:9,NETWORK_NOT_CONFIGURED:10},u={OP_CODE:0,STATUS:4,PATH_LENGTH:8,DATA_LENGTH:12,RESULT_LENGTH:16,ERROR_CODE:20,FLAGS:24,MODE:28,PATH_BUFFER:32,DATA_BUFFER:4128},d={CONTROL_REGION:32,PATH_BUFFER:4096,DATA_BUFFER:1048576,TOTAL:1052704},f={NONE:0,RECURSIVE:1,FORCE:2,MKDIR_RECURSIVE:1},p={IS_FILE:0,IS_DIRECTORY:1,IS_SYMLINK:2,MODE:4,SIZE:8,MTIME:16,TOTAL:24};function m(){return new t(d.TOTAL)}var h=class{int32View;uint8View;dataView;constructor(e){this.int32View=new Int32Array(e),this.uint8View=new Uint8Array(e),this.dataView=new DataView(e)}getOpCode(){return n.load(this.int32View,u.OP_CODE/4)}setOpCode(e){n.store(this.int32View,u.OP_CODE/4,e)}getStatus(){return n.load(this.int32View,u.STATUS/4)}setStatus(e){n.store(this.int32View,u.STATUS/4,e)}getPathLength(){return n.load(this.int32View,u.PATH_LENGTH/4)}setPathLength(e){n.store(this.int32View,u.PATH_LENGTH/4,e)}getDataLength(){return n.load(this.int32View,u.DATA_LENGTH/4)}setDataLength(e){n.store(this.int32View,u.DATA_LENGTH/4,e)}getResultLength(){return n.load(this.int32View,u.RESULT_LENGTH/4)}setResultLength(e){n.store(this.int32View,u.RESULT_LENGTH/4,e)}getErrorCode(){return n.load(this.int32View,u.ERROR_CODE/4)}setErrorCode(e){n.store(this.int32View,u.ERROR_CODE/4,e)}getFlags(){return n.load(this.int32View,u.FLAGS/4)}setFlags(e){n.store(this.int32View,u.FLAGS/4,e)}getMode(){return n.load(this.int32View,u.MODE/4)}setMode(e){n.store(this.int32View,u.MODE/4,e)}getPath(){let e=this.getPathLength(),t=this.uint8View.slice(u.PATH_BUFFER,u.PATH_BUFFER+e);return new TextDecoder().decode(t)}setPath(e){let t=new TextEncoder().encode(e);if(t.length>d.PATH_BUFFER)throw Error(`Path too long: ${t.length} > ${d.PATH_BUFFER}`);this.uint8View.set(t,u.PATH_BUFFER),this.setPathLength(t.length)}getData(){let e=this.getDataLength();return this.uint8View.slice(u.DATA_BUFFER,u.DATA_BUFFER+e)}setData(e){if(e.length>d.DATA_BUFFER)throw Error(`Data too large: ${e.length} > ${d.DATA_BUFFER}`);this.uint8View.set(e,u.DATA_BUFFER),this.setDataLength(e.length)}getDataAsString(){let e=this.getData();return new TextDecoder().decode(e)}setDataFromString(e){let t=new TextEncoder().encode(e);this.setData(t)}getResult(){let e=this.getResultLength();return this.uint8View.slice(u.DATA_BUFFER,u.DATA_BUFFER+e)}setResult(e){if(e.length>d.DATA_BUFFER)throw Error(`Result too large: ${e.length} > ${d.DATA_BUFFER}`);this.uint8View.set(e,u.DATA_BUFFER),this.setResultLength(e.length)}getResultAsString(){let e=this.getResult();return new TextDecoder().decode(e)}setResultFromString(e){let t=new TextEncoder().encode(e);this.setResult(t)}encodeStat(e){this.uint8View[u.DATA_BUFFER+p.IS_FILE]=e.isFile?1:0,this.uint8View[u.DATA_BUFFER+p.IS_DIRECTORY]=e.isDirectory?1:0,this.uint8View[u.DATA_BUFFER+p.IS_SYMLINK]=e.isSymbolicLink?1:0,this.dataView.setInt32(u.DATA_BUFFER+p.MODE,e.mode,!0);let t=Math.min(e.size,2**53-1);this.dataView.setFloat64(u.DATA_BUFFER+p.SIZE,t,!0),this.dataView.setFloat64(u.DATA_BUFFER+p.MTIME,e.mtime.getTime(),!0),this.setResultLength(p.TOTAL)}decodeStat(){return{isFile:this.uint8View[u.DATA_BUFFER+p.IS_FILE]===1,isDirectory:this.uint8View[u.DATA_BUFFER+p.IS_DIRECTORY]===1,isSymbolicLink:this.uint8View[u.DATA_BUFFER+p.IS_SYMLINK]===1,mode:this.dataView.getInt32(u.DATA_BUFFER+p.MODE,!0),size:this.dataView.getFloat64(u.DATA_BUFFER+p.SIZE,!0),mtime:new Date(this.dataView.getFloat64(u.DATA_BUFFER+p.MTIME,!0))}}waitForReady(e){return n.wait(this.int32View,u.STATUS/4,c.PENDING,e)}waitForReadyAsync(e){return n.waitAsync(this.int32View,u.STATUS/4,c.PENDING,e)}async waitUntilReady(e){let t=Date.now();for(;;){let r=this.getStatus();if(r===c.READY)return!0;let i=Date.now()-t;if(i>=e)return!1;let a=e-i,o=n.waitAsync(this.int32View,u.STATUS/4,r,a);if(o.async&&await o.value===`timed-out`)return!1}}waitForResult(e){return n.wait(this.int32View,u.STATUS/4,c.READY,e)}notify(){return n.notify(this.int32View,u.STATUS/4)}reset(){this.setOpCode(s.NOOP),this.setStatus(c.PENDING),this.setPathLength(0),this.setDataLength(0),this.setResultLength(0),this.setErrorCode(l.NONE),this.setFlags(f.NONE),this.setMode(0)}},g=class{fs;cwd;commandName;secureFetch;maxOutputSize;exec;protocol;running=!1;output={stdout:``,stderr:``,exitCode:0};outputLimitExceeded=!1;startTime=0;timeoutMs=0;constructor(e,t,n,r,i=void 0,a=0,o=void 0){this.fs=t,this.cwd=n,this.commandName=r,this.secureFetch=i,this.maxOutputSize=a,this.exec=o,this.protocol=new h(e)}remainingMs(){return Math.max(0,this.timeoutMs-(Date.now()-this.startTime))}raceDeadline(e){let t=this.remainingMs();if(t<=0)return this.running=!1,this.output.exitCode=124,this.output.stderr+=`
|
|
2
2
|
${this.commandName}: execution timeout exceeded
|
|
3
3
|
`,Promise.reject(Error(`Operation timed out`));let n=e();return new Promise((e,a)=>{let o=i(()=>{this.running=!1,this.output.exitCode=124,this.output.stderr+=`
|
|
4
4
|
${this.commandName}: execution timeout exceeded
|
|
@@ -8,4 +8,4 @@ ${this.commandName}: execution timeout exceeded
|
|
|
8
8
|
${this.commandName}: execution timeout exceeded
|
|
9
9
|
`,this.output.exitCode=124;break}let n=this.protocol.getOpCode();await this.handleOperation(n),this.protocol.notify()}return this.output}stop(){this.running=!1}async handleOperation(e){try{switch(e){case s.READ_FILE:await this.handleReadFile();break;case s.WRITE_FILE:await this.handleWriteFile();break;case s.STAT:await this.handleStat();break;case s.LSTAT:await this.handleLstat();break;case s.READDIR:await this.handleReaddir();break;case s.MKDIR:await this.handleMkdir();break;case s.RM:await this.handleRm();break;case s.EXISTS:await this.handleExists();break;case s.APPEND_FILE:await this.handleAppendFile();break;case s.SYMLINK:await this.handleSymlink();break;case s.READLINK:await this.handleReadlink();break;case s.CHMOD:await this.handleChmod();break;case s.REALPATH:await this.handleRealpath();break;case s.RENAME:await this.handleRename();break;case s.COPY_FILE:await this.handleCopyFile();break;case s.WRITE_STDOUT:this.handleWriteStdout();break;case s.WRITE_STDERR:this.handleWriteStderr();break;case s.EXIT:this.handleExit();break;case s.HTTP_REQUEST:await this.handleHttpRequest();break;case s.EXEC_COMMAND:await this.handleExecCommand();break;default:this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setStatus(c.ERROR)}}catch(e){this.setErrorFromException(e)}}resolvePath(e){return this.fs.resolvePath(this.cwd,e)}async handleReadFile(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.readFileBuffer(e);this.protocol.setResult(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleWriteFile(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getData();try{await this.fs.writeFile(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleStat(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.stat(e);this.protocol.encodeStat(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleLstat(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.lstat(e);this.protocol.encodeStat(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReaddir(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.readdir(e);this.protocol.setResultFromString(JSON.stringify(t)),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleMkdir(){let e=this.resolvePath(this.protocol.getPath()),t=(this.protocol.getFlags()&f.MKDIR_RECURSIVE)!==0;try{await this.fs.mkdir(e,{recursive:t}),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRm(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getFlags(),n=(t&f.RECURSIVE)!==0,r=(t&f.FORCE)!==0;try{await this.fs.rm(e,{recursive:n,force:r}),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleExists(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.exists(e);this.protocol.setResult(new Uint8Array([t?1:0])),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleAppendFile(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getData();try{await this.fs.appendFile(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleSymlink(){let e=this.protocol.getPath(),t=this.protocol.getDataAsString(),n=this.resolvePath(e);try{await this.fs.symlink(t,n),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleReadlink(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.readlink(e);this.protocol.setResultFromString(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleChmod(){let e=this.resolvePath(this.protocol.getPath()),t=this.protocol.getMode();try{await this.fs.chmod(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRealpath(){let e=this.resolvePath(this.protocol.getPath());try{let t=await this.fs.realpath(e);this.protocol.setResultFromString(t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleRename(){let e=this.resolvePath(this.protocol.getPath()),t=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.mv(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}async handleCopyFile(){let e=this.resolvePath(this.protocol.getPath()),t=this.resolvePath(this.protocol.getDataAsString());try{await this.fs.cp(e,t),this.protocol.setStatus(c.SUCCESS)}catch(e){this.setErrorFromException(e)}}handleWriteStdout(){let e=this.protocol.getDataAsString();if(!this.tryAppendOutput(`stdout`,e)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(`Output size limit exceeded`),this.protocol.setStatus(c.ERROR);return}this.protocol.setStatus(c.SUCCESS)}handleWriteStderr(){let e=this.protocol.getDataAsString();if(!this.tryAppendOutput(`stderr`,e)){this.outputLimitExceeded=!0,this.output.exitCode=1,this.appendOutputLimitError(),this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(`Output size limit exceeded`),this.protocol.setStatus(c.ERROR);return}this.protocol.setStatus(c.SUCCESS)}handleExit(){let e=this.protocol.getFlags();this.outputLimitExceeded?this.output.exitCode===0&&(this.output.exitCode=1):this.output.exitCode=e,this.protocol.setStatus(c.SUCCESS),this.running=!1}tryAppendOutput(e,t){return this.outputLimitExceeded?!1:this.maxOutputSize<=0?(e===`stdout`?this.output.stdout+=t:this.output.stderr+=t,!0):this.output.stdout.length+this.output.stderr.length+t.length>this.maxOutputSize?!1:(e===`stdout`?this.output.stdout+=t:this.output.stderr+=t,!0)}appendOutputLimitError(){if(this.maxOutputSize<=0)return;let e=`${this.commandName}: total output size exceeded (>${this.maxOutputSize} bytes), increase executionLimits.maxOutputSize
|
|
10
10
|
`,t=e.length>this.maxOutputSize?e.slice(0,this.maxOutputSize):e;if(this.output.stderr.includes(`total output size exceeded`))return;let n=this.output.stdout.length+this.output.stderr.length+t.length-this.maxOutputSize;if(n>0)if(this.output.stdout.length>=n)this.output.stdout=this.output.stdout.slice(0,this.output.stdout.length-n);else{let e=n-this.output.stdout.length;this.output.stdout=``,e>=this.output.stderr.length?this.output.stderr=``:this.output.stderr=this.output.stderr.slice(0,this.output.stderr.length-e)}this.output.stderr+=t}async handleHttpRequest(){let t=this.secureFetch;if(!t){this.protocol.setErrorCode(l.NETWORK_NOT_CONFIGURED),this.protocol.setResultFromString(`Network access not configured. Enable network in Bash options.`),this.protocol.setStatus(c.ERROR);return}let n=this.protocol.getPath(),r=this.protocol.getDataAsString();try{let i=r?JSON.parse(r):{},a=this.remainingMs(),o=await this.raceDeadline(()=>t(n,{method:i.method,headers:i.headers,body:i.body,timeoutMs:a})),s=JSON.stringify({status:o.status,statusText:o.statusText,headers:o.headers,bodyBase64:e(o.body,`base64`),url:o.url});this.protocol.setResultFromString(s),this.protocol.setStatus(c.SUCCESS)}catch(e){let t=o(e instanceof Error?e.message:String(e));this.protocol.setErrorCode(l.NETWORK_ERROR),this.protocol.setResultFromString(t),this.protocol.setStatus(c.ERROR)}}async handleExecCommand(){let e=this.exec;if(!e){this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(`Command execution not available in this context.`),this.protocol.setStatus(c.ERROR);return}let t=this.protocol.getPath(),n=this.protocol.getDataAsString(),r=new AbortController;try{let i={cwd:this.cwd,signal:r.signal};if(n){let e=JSON.parse(n);e.stdin&&(i.stdin=e.stdin),e.args&&Array.isArray(e.args)&&(i.args=e.args.map(e=>String(e)),t=a([t]))}let o=await this.raceDeadline(()=>e(t,i)),s=JSON.stringify({stdout:o.stdout,stderr:o.stderr,exitCode:o.exitCode});this.protocol.setResultFromString(s),this.protocol.setStatus(c.SUCCESS)}catch(e){r.abort();let t=e instanceof Error?e.message:String(e);this.protocol.setErrorCode(l.IO_ERROR),this.protocol.setResultFromString(t),this.protocol.setStatus(c.ERROR)}}setErrorFromException(e){let t=e instanceof Error?e.message:String(e),n=o(t),r=l.IO_ERROR,i=t.toLowerCase();i.includes(`no such file`)||i.includes(`not found`)||i.includes(`enoent`)?r=l.NOT_FOUND:i.includes(`is a directory`)||i.includes(`eisdir`)?r=l.IS_DIRECTORY:i.includes(`not a directory`)||i.includes(`enotdir`)?r=l.NOT_DIRECTORY:i.includes(`already exists`)||i.includes(`eexist`)?r=l.EXISTS:(i.includes(`permission`)||i.includes(`eperm`)||i.includes(`eacces`))&&(r=l.PERMISSION_DENIED),this.protocol.setErrorCode(r),this.protocol.setResultFromString(n),this.protocol.setStatus(c.ERROR)}};export{m as n,g as t};
|
|
11
|
-
//# sourceMappingURL=chunk-I57KEIP3-
|
|
11
|
+
//# sourceMappingURL=chunk-I57KEIP3-DSoF8c_0.mjs.map
|