@jerryan/just-bash 3.10.0 → 3.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/README.md +2 -2
- package/dist/AGENTS.md +2 -2
- package/dist/abort-signals.d.ts +10 -0
- package/dist/bin/chunks/awk2-LCV2AUIX.js +3 -0
- package/dist/bin/{shell/chunks/base64-TQ5KOCNW.js → chunks/base64-OLYCF2PC.js} +1 -1
- package/dist/bin/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
- package/dist/bin/{shell/chunks/chmod-S4ARARR4.js → chunks/chmod-V5F4BXZ2.js} +1 -1
- package/dist/bin/chunks/{chunk-V4S4A7M6.js → chunk-2TEF4USR.js} +1 -1
- package/dist/bin/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-M3Z5NZXT.js → chunks/chunk-572NXISH.js} +1 -1
- package/dist/bin/chunks/chunk-5NWK7A4R.js +13 -0
- package/dist/bin/{shell/chunks/chunk-YXPSX3SI.js → chunks/chunk-623Q77WZ.js} +1 -1
- package/dist/bin/chunks/chunk-6NG4ULJM.js +7 -0
- package/dist/bin/chunks/{chunk-QFOXSCOD.js → chunk-726WDFMQ.js} +1 -1
- package/dist/bin/chunks/{chunk-4JPWP5WS.js → chunk-AJ3CSZ34.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-VTAMGD42.js → chunks/chunk-APEQNYAO.js} +1 -1
- package/dist/bin/chunks/chunk-BFLKIASG.js +7 -0
- package/dist/bin/chunks/{chunk-IOKQFPM6.js → chunk-BRB5PJ3E.js} +1 -1
- package/dist/bin/chunks/{chunk-ZVG47PYA.js → chunk-BVBYPYA5.js} +1 -1
- package/dist/bin/chunks/{chunk-K65FCSAT.js → chunk-BZJ77YQD.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-GR4ZHKXI.js → chunks/chunk-C2BLJ3AE.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-R7THHH4J.js → chunks/chunk-C45GTJTD.js} +1 -1
- package/dist/bin/chunks/{chunk-GOWX7VPU.js → chunk-CTS7QXCJ.js} +1 -1
- package/dist/bin/chunks/{chunk-42AMF6EE.js → chunk-DTNGYQCJ.js} +1 -1
- package/dist/bin/chunks/{chunk-TW2IJRUF.js → chunk-ENEHPI32.js} +1 -1
- package/dist/bin/chunks/{chunk-E54Z6VIE.js → chunk-ERYPQAZE.js} +5 -5
- package/dist/bin/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-E2O6S35K.js → chunks/chunk-HFVQCXYX.js} +1 -1
- package/dist/bin/chunks/{chunk-IRCAXXH6.js → chunk-HSWCKN2X.js} +1 -1
- package/dist/bin/chunks/{chunk-B6WWC6K3.js → chunk-I6MS5ZWE.js} +1 -1
- package/dist/bin/chunks/{chunk-V4U26ZWL.js → chunk-IOFXLMNJ.js} +1 -1
- package/dist/bin/chunks/chunk-IX6QY5JW.js +5 -0
- package/dist/bin/chunks/{chunk-QKJAAJ7J.js → chunk-IXTPVJ6W.js} +1 -1
- package/dist/bin/chunks/{chunk-OUQKFRVR.js → chunk-JBYLHCKP.js} +1 -1
- package/dist/bin/chunks/{chunk-NXUXZWS5.js → chunk-JLRB7DV3.js} +1 -1
- package/dist/bin/chunks/chunk-JZR2C63H.js +17 -0
- package/dist/bin/{shell/chunks/chunk-GKJD4ULC.js → chunks/chunk-KH6YLKPE.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-Z3TCELKN.js → chunks/chunk-KXSDVBJA.js} +1 -1
- package/dist/bin/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
- package/dist/bin/{shell/chunks/chunk-L345YZ6R.js → chunks/chunk-LVT5R45K.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-PTUQEN6I.js → chunks/chunk-M345X45Z.js} +7 -7
- package/dist/bin/chunks/{chunk-MWQMHODV.js → chunk-NDS7PYKD.js} +1 -1
- package/dist/bin/chunks/chunk-O3PNT72D.js +3 -0
- package/dist/bin/chunks/chunk-OGOISDGZ.js +3 -0
- package/dist/bin/chunks/chunk-OSW4MDDH.js +21 -0
- package/dist/bin/chunks/{chunk-FPWHWWXO.js → chunk-OXV2B2YS.js} +1 -1
- package/dist/bin/chunks/{chunk-QMPZXXEK.js → chunk-OY25E3ZN.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-O2BCKSMK.js → chunks/chunk-PEJXCXSY.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-6KHZX4HU.js → chunks/chunk-PLLMJHMV.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-6TUILMPB.js → chunks/chunk-QELDDRV5.js} +1 -1
- package/dist/bin/chunks/{chunk-3FQBUEB6.js → chunk-RC4UXNHA.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-H7PD6FLC.js → chunks/chunk-RE7Z53A3.js} +1 -1
- package/dist/bin/chunks/chunk-SCQRBEQW.js +275 -0
- package/dist/bin/chunks/{chunk-3DWQCLNP.js → chunk-SS2OPV62.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-CC2AQ6B7.js → chunks/chunk-U6JTVQU6.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-UNCYBFWT.js → chunks/chunk-UFAYH3WW.js} +1 -1
- package/dist/bin/chunks/chunk-UPUFWGHR.js +3 -0
- package/dist/bin/{shell/chunks/chunk-HARVZWUX.js → chunks/chunk-UU42WPB7.js} +1 -1
- package/dist/bin/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-F4ACJZIY.js → chunks/chunk-WLQ2KWS3.js} +1 -1
- package/dist/bin/chunks/{chunk-MVBK66TR.js → chunk-WPJ5CECR.js} +1 -1
- package/dist/bin/chunks/{chunk-ANX7U57Q.js → chunk-XBOBVLRL.js} +2 -2
- package/dist/bin/chunks/{chunk-HZGHQZSY.js → chunk-Z3MXFCN7.js} +1 -1
- package/dist/bin/chunks/{column-AJFK3TWF.js → column-AL4LR5PO.js} +1 -1
- package/dist/bin/chunks/{cp-WRBRHVVD.js → cp-XJWV46T5.js} +1 -1
- package/dist/bin/chunks/{curl-NHNZ46BU.js → curl-HZ5SBTVY.js} +11 -11
- package/dist/bin/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
- package/dist/bin/chunks/dist-4NZ74CRE.js +141 -0
- package/dist/bin/chunks/{expr-PQEPO5TE.js → expr-GLGO2VEZ.js} +1 -1
- package/dist/bin/chunks/{file-JA7QI2YT.js → file-7M5LLZJY.js} +1 -1
- package/dist/bin/chunks/{find-T3JZPTUX.js → find-QM4ZVJ2E.js} +1 -1
- package/dist/bin/chunks/flag-coverage-ERCJF44K.js +3 -0
- package/dist/bin/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
- package/dist/bin/chunks/{gzip-EXJSFNCU.js → gzip-W5CL2E2W.js} +1 -1
- package/dist/bin/{shell/chunks/head-QKVY3SIO.js → chunks/head-ABLEKDMV.js} +1 -1
- package/dist/bin/{shell/chunks/help-HVIDHJ6M.js → chunks/help-EXVKU23F.js} +1 -1
- package/dist/bin/chunks/{html-to-markdown-XUMA42ZC.js → html-to-markdown-FDNPIEKZ.js} +1 -1
- package/dist/bin/{shell/chunks/jq-YS4PR46D.js → chunks/jq-5SOTL7D7.js} +1 -1
- package/dist/bin/chunks/{js-exec-PLUMFEX6.js → js-exec-LISDW7YC.js} +1 -1
- package/dist/bin/chunks/js-exec-worker.js +1 -0
- package/dist/bin/{shell/chunks/ls-LOCOWLZ3.js → chunks/ls-EEX3YIOF.js} +1 -1
- package/dist/bin/chunks/mkdir-KDEZTR53.js +3 -0
- package/dist/bin/chunks/mktemp-OYQYUB5H.js +3 -0
- package/dist/bin/chunks/{mv-NAMOL2HF.js → mv-35V6IA5V.js} +1 -1
- package/dist/bin/chunks/{od-2GXD4D5K.js → od-TD5LZDUM.js} +1 -1
- package/dist/bin/{shell/chunks/paste-DWWA3JTW.js → chunks/paste-QJG6BYAP.js} +1 -1
- package/dist/bin/chunks/{python3-J5GXF27H.js → python3-P6MZ44HK.js} +1 -1
- package/dist/bin/{shell/chunks/rg-XF5U7GS2.js → chunks/rg-B2DVJQVY.js} +1 -1
- package/dist/bin/chunks/rm-HCMKNRM2.js +3 -0
- package/dist/bin/{shell/chunks/rmdir-W73C4GEA.js → chunks/rmdir-WGVUYGPF.js} +1 -1
- package/dist/bin/{shell/chunks/sed-SY63U2YX.js → chunks/sed-66XZQ75T.js} +1 -1
- package/dist/bin/chunks/{seq-X2EAOGV5.js → seq-KBVCQ4WT.js} +1 -1
- package/dist/bin/{shell/chunks/sleep-MOJQBZMY.js → chunks/sleep-4O22Z4DI.js} +1 -1
- package/dist/bin/chunks/{split-2VXPZJJ4.js → split-OK6JHDWZ.js} +1 -1
- package/dist/bin/chunks/sqlite3-57ACN7ES.js +3 -0
- package/dist/bin/chunks/{stat-LROLDXHH.js → stat-VNNI7JDZ.js} +1 -1
- package/dist/bin/chunks/{tail-UOTUV25D.js → tail-PAHZX3MA.js} +1 -1
- package/dist/bin/chunks/{tar-7XOP7VOX.js → tar-RPVTXGFJ.js} +1 -1
- package/dist/bin/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
- package/dist/bin/chunks/timeout-XMTXHNFF.js +3 -0
- package/dist/bin/{shell/chunks/tr-PVFO6FRY.js → chunks/tr-ETPC3LHV.js} +1 -1
- package/dist/bin/chunks/worker.js +5 -0
- package/dist/bin/chunks/{xan-RMH6JEXM.js → xan-XZHKEPJ4.js} +1 -1
- package/dist/bin/chunks/{xan-view-PD26QEFN.js → xan-view-CNGKCABE.js} +1 -1
- package/dist/bin/chunks/yes-2EQTNSIB.js +3 -0
- package/dist/bin/chunks/yq-T6S3IDKY.js +3 -0
- package/dist/bin/just-bash.js +291 -286
- package/dist/bin/shell/chunks/awk2-LCV2AUIX.js +3 -0
- package/dist/bin/{chunks/base64-TQ5KOCNW.js → shell/chunks/base64-OLYCF2PC.js} +1 -1
- package/dist/bin/shell/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
- package/dist/bin/{chunks/chmod-S4ARARR4.js → shell/chunks/chmod-V5F4BXZ2.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-V4S4A7M6.js → chunk-2TEF4USR.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
- package/dist/bin/{chunks/chunk-M3Z5NZXT.js → shell/chunks/chunk-572NXISH.js} +1 -1
- package/dist/bin/shell/chunks/chunk-5NWK7A4R.js +13 -0
- package/dist/bin/{chunks/chunk-YXPSX3SI.js → shell/chunks/chunk-623Q77WZ.js} +1 -1
- package/dist/bin/shell/chunks/chunk-6NG4ULJM.js +7 -0
- package/dist/bin/shell/chunks/{chunk-QFOXSCOD.js → chunk-726WDFMQ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-4JPWP5WS.js → chunk-AJ3CSZ34.js} +1 -1
- package/dist/bin/{chunks/chunk-VTAMGD42.js → shell/chunks/chunk-APEQNYAO.js} +1 -1
- package/dist/bin/shell/chunks/chunk-BFLKIASG.js +7 -0
- package/dist/bin/shell/chunks/{chunk-IOKQFPM6.js → chunk-BRB5PJ3E.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-ZVG47PYA.js → chunk-BVBYPYA5.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-K65FCSAT.js → chunk-BZJ77YQD.js} +1 -1
- package/dist/bin/{chunks/chunk-GR4ZHKXI.js → shell/chunks/chunk-C2BLJ3AE.js} +1 -1
- package/dist/bin/{chunks/chunk-R7THHH4J.js → shell/chunks/chunk-C45GTJTD.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-GOWX7VPU.js → chunk-CTS7QXCJ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-42AMF6EE.js → chunk-DTNGYQCJ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-TW2IJRUF.js → chunk-ENEHPI32.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-E54Z6VIE.js → chunk-ERYPQAZE.js} +5 -5
- package/dist/bin/shell/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
- package/dist/bin/{chunks/chunk-E2O6S35K.js → shell/chunks/chunk-HFVQCXYX.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-IRCAXXH6.js → chunk-HSWCKN2X.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-B6WWC6K3.js → chunk-I6MS5ZWE.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-V4U26ZWL.js → chunk-IOFXLMNJ.js} +1 -1
- package/dist/bin/shell/chunks/chunk-IX6QY5JW.js +5 -0
- package/dist/bin/shell/chunks/{chunk-QKJAAJ7J.js → chunk-IXTPVJ6W.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-OUQKFRVR.js → chunk-JBYLHCKP.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-NXUXZWS5.js → chunk-JLRB7DV3.js} +1 -1
- package/dist/bin/shell/chunks/chunk-JZR2C63H.js +17 -0
- package/dist/bin/{chunks/chunk-GKJD4ULC.js → shell/chunks/chunk-KH6YLKPE.js} +1 -1
- package/dist/bin/{chunks/chunk-Z3TCELKN.js → shell/chunks/chunk-KXSDVBJA.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
- package/dist/bin/{chunks/chunk-L345YZ6R.js → shell/chunks/chunk-LVT5R45K.js} +1 -1
- package/dist/bin/{chunks/chunk-PTUQEN6I.js → shell/chunks/chunk-M345X45Z.js} +7 -7
- package/dist/bin/shell/chunks/{chunk-MWQMHODV.js → chunk-NDS7PYKD.js} +1 -1
- package/dist/bin/shell/chunks/chunk-O3PNT72D.js +3 -0
- package/dist/bin/shell/chunks/chunk-OGOISDGZ.js +3 -0
- package/dist/bin/shell/chunks/chunk-OSW4MDDH.js +21 -0
- package/dist/bin/shell/chunks/{chunk-FPWHWWXO.js → chunk-OXV2B2YS.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-QMPZXXEK.js → chunk-OY25E3ZN.js} +1 -1
- package/dist/bin/{chunks/chunk-O2BCKSMK.js → shell/chunks/chunk-PEJXCXSY.js} +1 -1
- package/dist/bin/{chunks/chunk-6KHZX4HU.js → shell/chunks/chunk-PLLMJHMV.js} +1 -1
- package/dist/bin/{chunks/chunk-6TUILMPB.js → shell/chunks/chunk-QELDDRV5.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-3FQBUEB6.js → chunk-RC4UXNHA.js} +1 -1
- package/dist/bin/{chunks/chunk-H7PD6FLC.js → shell/chunks/chunk-RE7Z53A3.js} +1 -1
- package/dist/bin/shell/chunks/chunk-SCQRBEQW.js +275 -0
- package/dist/bin/shell/chunks/{chunk-3DWQCLNP.js → chunk-SS2OPV62.js} +1 -1
- package/dist/bin/{chunks/chunk-CC2AQ6B7.js → shell/chunks/chunk-U6JTVQU6.js} +1 -1
- package/dist/bin/{chunks/chunk-UNCYBFWT.js → shell/chunks/chunk-UFAYH3WW.js} +1 -1
- package/dist/bin/shell/chunks/chunk-UPUFWGHR.js +3 -0
- package/dist/bin/{chunks/chunk-HARVZWUX.js → shell/chunks/chunk-UU42WPB7.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
- package/dist/bin/{chunks/chunk-F4ACJZIY.js → shell/chunks/chunk-WLQ2KWS3.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-MVBK66TR.js → chunk-WPJ5CECR.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-ANX7U57Q.js → chunk-XBOBVLRL.js} +2 -2
- package/dist/bin/shell/chunks/{chunk-HZGHQZSY.js → chunk-Z3MXFCN7.js} +1 -1
- package/dist/bin/shell/chunks/{column-AJFK3TWF.js → column-AL4LR5PO.js} +1 -1
- package/dist/bin/shell/chunks/{cp-WRBRHVVD.js → cp-XJWV46T5.js} +1 -1
- package/dist/bin/shell/chunks/{curl-NHNZ46BU.js → curl-HZ5SBTVY.js} +11 -11
- package/dist/bin/shell/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
- package/dist/bin/shell/chunks/dist-4NZ74CRE.js +141 -0
- package/dist/bin/shell/chunks/{expr-PQEPO5TE.js → expr-GLGO2VEZ.js} +1 -1
- package/dist/bin/shell/chunks/{file-JA7QI2YT.js → file-7M5LLZJY.js} +1 -1
- package/dist/bin/shell/chunks/{find-T3JZPTUX.js → find-QM4ZVJ2E.js} +1 -1
- package/dist/bin/shell/chunks/flag-coverage-ERCJF44K.js +3 -0
- package/dist/bin/shell/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
- package/dist/bin/shell/chunks/{gzip-EXJSFNCU.js → gzip-W5CL2E2W.js} +1 -1
- package/dist/bin/{chunks/head-QKVY3SIO.js → shell/chunks/head-ABLEKDMV.js} +1 -1
- package/dist/bin/{chunks/help-HVIDHJ6M.js → shell/chunks/help-EXVKU23F.js} +1 -1
- package/dist/bin/shell/chunks/{html-to-markdown-XUMA42ZC.js → html-to-markdown-FDNPIEKZ.js} +1 -1
- package/dist/bin/{chunks/jq-YS4PR46D.js → shell/chunks/jq-5SOTL7D7.js} +1 -1
- package/dist/bin/shell/chunks/{js-exec-PLUMFEX6.js → js-exec-LISDW7YC.js} +1 -1
- package/dist/bin/{chunks/ls-LOCOWLZ3.js → shell/chunks/ls-EEX3YIOF.js} +1 -1
- package/dist/bin/shell/chunks/mkdir-KDEZTR53.js +3 -0
- package/dist/bin/shell/chunks/mktemp-OYQYUB5H.js +3 -0
- package/dist/bin/shell/chunks/{mv-NAMOL2HF.js → mv-35V6IA5V.js} +1 -1
- package/dist/bin/shell/chunks/{od-2GXD4D5K.js → od-TD5LZDUM.js} +1 -1
- package/dist/bin/{chunks/paste-DWWA3JTW.js → shell/chunks/paste-QJG6BYAP.js} +1 -1
- package/dist/bin/shell/chunks/{python3-J5GXF27H.js → python3-P6MZ44HK.js} +1 -1
- package/dist/bin/{chunks/rg-XF5U7GS2.js → shell/chunks/rg-B2DVJQVY.js} +1 -1
- package/dist/bin/shell/chunks/rm-HCMKNRM2.js +3 -0
- package/dist/bin/{chunks/rmdir-W73C4GEA.js → shell/chunks/rmdir-WGVUYGPF.js} +1 -1
- package/dist/bin/{chunks/sed-SY63U2YX.js → shell/chunks/sed-66XZQ75T.js} +1 -1
- package/dist/bin/shell/chunks/{seq-X2EAOGV5.js → seq-KBVCQ4WT.js} +1 -1
- package/dist/bin/{chunks/sleep-MOJQBZMY.js → shell/chunks/sleep-4O22Z4DI.js} +1 -1
- package/dist/bin/shell/chunks/{split-2VXPZJJ4.js → split-OK6JHDWZ.js} +1 -1
- package/dist/bin/shell/chunks/sqlite3-57ACN7ES.js +3 -0
- package/dist/bin/shell/chunks/{stat-LROLDXHH.js → stat-VNNI7JDZ.js} +1 -1
- package/dist/bin/shell/chunks/{tail-UOTUV25D.js → tail-PAHZX3MA.js} +1 -1
- package/dist/bin/shell/chunks/{tar-7XOP7VOX.js → tar-RPVTXGFJ.js} +1 -1
- package/dist/bin/shell/chunks/{time-LF7BTSK5.js → time-J2DAZUIN.js} +1 -1
- package/dist/bin/shell/chunks/timeout-XMTXHNFF.js +3 -0
- package/dist/bin/{chunks/tr-PVFO6FRY.js → shell/chunks/tr-ETPC3LHV.js} +1 -1
- package/dist/bin/shell/chunks/{xan-RMH6JEXM.js → xan-XZHKEPJ4.js} +1 -1
- package/dist/bin/shell/chunks/{xan-view-PD26QEFN.js → xan-view-CNGKCABE.js} +1 -1
- package/dist/bin/shell/chunks/yes-2EQTNSIB.js +3 -0
- package/dist/bin/shell/chunks/yq-T6S3IDKY.js +3 -0
- package/dist/bin/shell/shell.js +337 -332
- package/dist/browser.d.ts +1 -1
- package/dist/bundle/browser.js +741 -730
- package/dist/bundle/chunks/awk2-TLK6FCHV.js +2 -0
- package/dist/bundle/chunks/{base64-MHVQ5XHI.js → base64-GUZMZ645.js} +1 -1
- package/dist/bundle/chunks/{cat-VZBWBIJB.js → cat-LG4YGKUE.js} +1 -1
- package/dist/bundle/chunks/{chmod-KMFNCMRX.js → chmod-XUKPG2M4.js} +1 -1
- package/dist/bundle/chunks/{chunk-WNH3HOQA.js → chunk-353VO5TF.js} +1 -1
- package/dist/bundle/chunks/{chunk-O5OYOY3C.js → chunk-37UJACD6.js} +1 -1
- package/dist/bundle/chunks/{chunk-MMXJJCAE.js → chunk-3LGQ6XEC.js} +1 -1
- package/dist/bundle/chunks/{chunk-P57S6Z6R.js → chunk-3ZY5QX3G.js} +1 -1
- package/dist/bundle/chunks/{chunk-5KOWUQOZ.js → chunk-4VU4IF3W.js} +1 -1
- package/dist/bundle/chunks/{chunk-SIOONII3.js → chunk-52W2IWA7.js} +1 -1
- package/dist/bundle/chunks/chunk-5IB57TIJ.js +274 -0
- package/dist/bundle/chunks/chunk-5J4S2LP5.js +2 -0
- package/dist/bundle/chunks/{chunk-PCPW54JH.js → chunk-5LDRJ22P.js} +1 -1
- package/dist/bundle/chunks/{chunk-BKUWXPEM.js → chunk-654CJKE3.js} +1 -1
- package/dist/bundle/chunks/{chunk-EZNS4GF7.js → chunk-67ODVGSB.js} +1 -1
- package/dist/bundle/chunks/{chunk-6QF3PCMO.js → chunk-6HQQON3N.js} +1 -1
- package/dist/bundle/chunks/{chunk-U57DSHID.js → chunk-6P2DITXT.js} +1 -1
- package/dist/bundle/chunks/chunk-6X2Y5CA2.js +16 -0
- package/dist/bundle/chunks/{chunk-THDUQVY3.js → chunk-74IR77AZ.js} +1 -1
- package/dist/bundle/chunks/{chunk-S3ENGQML.js → chunk-7DVD6YCI.js} +1 -1
- package/dist/bundle/chunks/{chunk-HXWB4Z5X.js → chunk-7II7XIVI.js} +1 -1
- package/dist/bundle/chunks/{chunk-AYSZ5MAE.js → chunk-A3C4Z3Q3.js} +1 -1
- package/dist/bundle/chunks/chunk-A6SU3BZX.js +6 -0
- package/dist/bundle/chunks/{chunk-5NUTFEEG.js → chunk-AMXNXHXK.js} +1 -1
- package/dist/bundle/chunks/{chunk-QJ7OXJAZ.js → chunk-BLG7RWH4.js} +1 -1
- package/dist/bundle/chunks/{chunk-XQ2ZZFO6.js → chunk-BQTWRHZR.js} +2 -2
- package/dist/bundle/chunks/{chunk-6IFH67ZB.js → chunk-BZ2OMW2T.js} +1 -1
- package/dist/bundle/chunks/{chunk-CH7SUFFO.js → chunk-CORCIYJD.js} +1 -1
- package/dist/bundle/chunks/{chunk-LGIJSCWH.js → chunk-EQDVNHQS.js} +1 -1
- package/dist/bundle/chunks/{chunk-U4K5ZDWK.js → chunk-EZEO6MFE.js} +1 -1
- package/dist/bundle/chunks/{chunk-4CDTAUYP.js → chunk-EZT6M2HG.js} +1 -1
- package/dist/bundle/chunks/{chunk-4MJ7VJG4.js → chunk-H7UVJSZR.js} +1 -1
- package/dist/bundle/chunks/{chunk-5EI7WSRV.js → chunk-HYQGYXGZ.js} +1 -1
- package/dist/bundle/chunks/{chunk-6IA4DXG2.js → chunk-IPKSYZ3R.js} +1 -1
- package/dist/bundle/chunks/{chunk-TLPMB3FO.js → chunk-KJBPGFZD.js} +1 -1
- package/dist/bundle/chunks/{chunk-YFFU74KY.js → chunk-MJEJ7QEY.js} +1 -1
- package/dist/bundle/chunks/{chunk-QJFYYEFV.js → chunk-N36I27VM.js} +1 -1
- package/dist/bundle/chunks/chunk-N5L7E4EL.js +6 -0
- package/dist/bundle/chunks/{chunk-IXFQXNL4.js → chunk-NFW4YKDO.js} +1 -1
- package/dist/bundle/chunks/{chunk-PASYAXFP.js → chunk-NOX3PCUH.js} +1 -1
- package/dist/bundle/chunks/{chunk-MQKGGNPS.js → chunk-NXBUT5V2.js} +2 -2
- package/dist/bundle/chunks/{chunk-4KZT23KR.js → chunk-O5BHWBYH.js} +1 -1
- package/dist/bundle/chunks/{chunk-DVSA72LH.js → chunk-QTL2XC4B.js} +1 -1
- package/dist/bundle/chunks/chunk-RK2WBVP4.js +2 -0
- package/dist/bundle/chunks/{chunk-BLPYR4TN.js → chunk-RVBBGZ22.js} +1 -1
- package/dist/bundle/chunks/{chunk-PS2RJNZZ.js → chunk-SXQJYLP7.js} +1 -1
- package/dist/bundle/chunks/{chunk-FXAKF2QS.js → chunk-T7OAZEXT.js} +1 -1
- package/dist/bundle/chunks/{chunk-O452S4KX.js → chunk-URIKBXSE.js} +1 -1
- package/dist/bundle/chunks/{chunk-6BSOPPZH.js → chunk-UVQC75LS.js} +7 -7
- package/dist/bundle/chunks/chunk-VCREDMWH.js +4 -0
- package/dist/bundle/chunks/{chunk-DDPD7SIB.js → chunk-VQ6EUBJ3.js} +1 -1
- package/dist/bundle/chunks/{chunk-4OKRFRMS.js → chunk-VQEB6E2M.js} +1 -1
- package/dist/bundle/chunks/{chunk-R2FBRMDU.js → chunk-VWUMR4IC.js} +1 -1
- package/dist/bundle/chunks/{chunk-XXBIOG4R.js → chunk-WDY2TNMK.js} +1 -1
- package/dist/bundle/chunks/{chunk-H4AFUSSQ.js → chunk-XT7EK6BR.js} +1 -1
- package/dist/bundle/chunks/{chunk-BS6EJR2R.js → chunk-XUTEQMTL.js} +5 -5
- package/dist/bundle/chunks/{chunk-KIGPB52X.js → chunk-XZ34OGNM.js} +1 -1
- package/dist/bundle/chunks/chunk-YUITEK6N.js +12 -0
- package/dist/bundle/chunks/chunk-YZCPEJRE.js +20 -0
- package/dist/bundle/chunks/chunk-ZUEPJPYA.js +2 -0
- package/dist/bundle/chunks/{column-QJI65SH2.js → column-T4LGMRJG.js} +1 -1
- package/dist/bundle/chunks/{cp-P2D2L6PC.js → cp-ZDDVNITX.js} +1 -1
- package/dist/bundle/chunks/{curl-K4WT7UPN.js → curl-RCRD36LD.js} +11 -11
- package/dist/bundle/chunks/{cut-FMDNVWQN.js → cut-35WER2E2.js} +1 -1
- package/dist/bundle/chunks/{expr-A5XITHQD.js → expr-KSNRNE7V.js} +1 -1
- package/dist/bundle/chunks/{file-6AYYTULJ.js → file-XH37HMGV.js} +1 -1
- package/dist/bundle/chunks/{find-IUWEB4XQ.js → find-BFNQSA5B.js} +1 -1
- package/dist/bundle/chunks/flag-coverage-7PBO3TUZ.js +2 -0
- package/dist/bundle/chunks/{grep-Q2O5EIXQ.js → grep-WW5KJPUG.js} +1 -1
- package/dist/bundle/chunks/{gzip-VUJBDHZ5.js → gzip-ISZXQNJJ.js} +1 -1
- package/dist/bundle/chunks/{head-6UIPFWVJ.js → head-VYXZQLPZ.js} +1 -1
- package/dist/bundle/chunks/{help-QDDMBDU7.js → help-62M75TSG.js} +1 -1
- package/dist/bundle/chunks/{html-to-markdown-PE6BPRPA.js → html-to-markdown-4LXS3A44.js} +1 -1
- package/dist/bundle/chunks/{jq-UKAA3QWU.js → jq-3IVOWP3G.js} +1 -1
- package/dist/bundle/chunks/{js-exec-6RW7WZCG.js → js-exec-T2WEE4KG.js} +1 -1
- package/dist/bundle/chunks/js-exec-worker.js +1 -0
- package/dist/bundle/chunks/{ls-ECKG2XHZ.js → ls-FC3CSHKE.js} +1 -1
- package/dist/bundle/chunks/mkdir-DPFWDY25.js +2 -0
- package/dist/bundle/chunks/mktemp-SW2AHXZW.js +2 -0
- package/dist/bundle/chunks/{mv-IF55A2UD.js → mv-PWCFXEF2.js} +1 -1
- package/dist/bundle/chunks/{od-Z4AIL3P4.js → od-VJ6PBBEI.js} +1 -1
- package/dist/bundle/chunks/{paste-ZNHNSRBW.js → paste-TIQETHSO.js} +1 -1
- package/dist/bundle/chunks/{python3-XHTOW7VA.js → python3-6JEP7ZZK.js} +1 -1
- package/dist/bundle/chunks/{rg-E6H2HACA.js → rg-2OPJ5V3D.js} +1 -1
- package/dist/bundle/chunks/rm-AZZM5DCE.js +2 -0
- package/dist/bundle/chunks/{rmdir-WKKBLZ54.js → rmdir-YXYSZD4X.js} +1 -1
- package/dist/bundle/chunks/{sed-6G32B25J.js → sed-HYSBLGO5.js} +1 -1
- package/dist/bundle/chunks/{seq-B6KDLMYQ.js → seq-M2S4FRN4.js} +1 -1
- package/dist/bundle/chunks/{sleep-25QUPVDK.js → sleep-YC4HFEGC.js} +1 -1
- package/dist/bundle/chunks/{split-NEU2K2YN.js → split-UOPIWKKE.js} +1 -1
- package/dist/bundle/chunks/sqlite3-XCROTL6G.js +2 -0
- package/dist/bundle/chunks/{stat-LXFZND2P.js → stat-I3FPUTR7.js} +1 -1
- package/dist/bundle/chunks/{tail-UBGSN4JF.js → tail-WK3WACZK.js} +1 -1
- package/dist/bundle/chunks/{tar-LE7LAAIX.js → tar-VZYMNZV2.js} +1 -1
- package/dist/bundle/chunks/{time-NERE2JJ2.js → time-N6J6DC6C.js} +1 -1
- package/dist/bundle/chunks/timeout-UDR5J2MP.js +2 -0
- package/dist/bundle/chunks/{tr-UI2LA3GA.js → tr-VI5PIA4A.js} +1 -1
- package/dist/bundle/chunks/worker.js +5 -0
- package/dist/bundle/chunks/{xan-UIL24CGT.js → xan-DL576EIT.js} +1 -1
- package/dist/bundle/chunks/xan-view-GJVN6IHX.js +2 -0
- package/dist/bundle/chunks/yes-OVJMX6NM.js +2 -0
- package/dist/bundle/chunks/yq-KYPU4LQP.js +2 -0
- package/dist/bundle/index.cjs +1079 -1068
- package/dist/bundle/index.js +336 -331
- package/dist/commands/mktemp/mktemp.d.ts +4 -0
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/yes/yes.d.ts +4 -0
- package/dist/custom-commands.d.ts +7 -0
- package/dist/fs/create-exclusive.d.ts +30 -0
- package/dist/fs/in-memory-fs/in-memory-fs.d.ts +8 -1
- package/dist/fs/interface.d.ts +37 -0
- package/dist/fs/mountable-fs/mountable-fs.d.ts +18 -1
- package/dist/fs/overlay-fs/overlay-fs.d.ts +19 -1
- package/dist/fs/read-write-fs/read-write-fs.d.ts +22 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/interpreter/expansion/array-prefix-suffix.d.ts +2 -1
- package/dist/interpreter/expansion/parameter-ops.d.ts +1 -0
- package/dist/interpreter/expansion/pattern-removal.d.ts +3 -0
- package/dist/interpreter/expansion/variable.d.ts +1 -1
- package/dist/interpreter/helpers/loop.d.ts +32 -0
- package/dist/network/dns-pin.d.ts +1 -32
- package/dist/network/fetch.d.ts +1 -1
- package/dist/security/trusted-globals.d.ts +8 -0
- package/package.json +3 -4
- package/dist/bin/chunks/awk2-NTRVFXRA.js +0 -3
- package/dist/bin/chunks/chunk-3PCPQIUD.js +0 -3
- package/dist/bin/chunks/chunk-HWI42GQO.js +0 -7
- package/dist/bin/chunks/chunk-I57EACSL.js +0 -3
- package/dist/bin/chunks/chunk-NSI6LMDS.js +0 -16
- package/dist/bin/chunks/chunk-ONF4KUYV.js +0 -13
- package/dist/bin/chunks/chunk-PRVPFKTC.js +0 -276
- package/dist/bin/chunks/chunk-U5JLGI56.js +0 -21
- package/dist/bin/chunks/dist-5MWO25Y4.js +0 -141
- package/dist/bin/chunks/flag-coverage-LVKHEUTL.js +0 -3
- package/dist/bin/chunks/mkdir-VHLJ3E65.js +0 -3
- package/dist/bin/chunks/rm-L4RHENMV.js +0 -3
- package/dist/bin/chunks/sqlite3-3S5HIA5W.js +0 -3
- package/dist/bin/chunks/timeout-RQOWSWYG.js +0 -3
- package/dist/bin/chunks/yq-CWBZMGUV.js +0 -3
- package/dist/bin/shell/chunks/awk2-NTRVFXRA.js +0 -3
- package/dist/bin/shell/chunks/chunk-3PCPQIUD.js +0 -3
- package/dist/bin/shell/chunks/chunk-HWI42GQO.js +0 -7
- package/dist/bin/shell/chunks/chunk-I57EACSL.js +0 -3
- package/dist/bin/shell/chunks/chunk-NSI6LMDS.js +0 -16
- package/dist/bin/shell/chunks/chunk-ONF4KUYV.js +0 -13
- package/dist/bin/shell/chunks/chunk-PRVPFKTC.js +0 -276
- package/dist/bin/shell/chunks/chunk-U5JLGI56.js +0 -21
- package/dist/bin/shell/chunks/dist-5MWO25Y4.js +0 -141
- package/dist/bin/shell/chunks/flag-coverage-LVKHEUTL.js +0 -3
- package/dist/bin/shell/chunks/mkdir-VHLJ3E65.js +0 -3
- package/dist/bin/shell/chunks/rm-L4RHENMV.js +0 -3
- package/dist/bin/shell/chunks/sqlite3-3S5HIA5W.js +0 -3
- package/dist/bin/shell/chunks/timeout-RQOWSWYG.js +0 -3
- package/dist/bin/shell/chunks/yq-CWBZMGUV.js +0 -3
- package/dist/bundle/chunks/awk2-VS5QVYHU.js +0 -2
- package/dist/bundle/chunks/chunk-35MBA3VY.js +0 -12
- package/dist/bundle/chunks/chunk-4WRO2G22.js +0 -15
- package/dist/bundle/chunks/chunk-BRJERIF4.js +0 -2
- package/dist/bundle/chunks/chunk-FTET43KM.js +0 -2
- package/dist/bundle/chunks/chunk-GRUZ4SBY.js +0 -275
- package/dist/bundle/chunks/chunk-Y6JBSHCM.js +0 -20
- package/dist/bundle/chunks/chunk-ZBUZKIPX.js +0 -6
- package/dist/bundle/chunks/flag-coverage-SZ4AUPRQ.js +0 -2
- package/dist/bundle/chunks/mkdir-YL7XGMD7.js +0 -2
- package/dist/bundle/chunks/rm-CWLMERIO.js +0 -2
- package/dist/bundle/chunks/sqlite3-KJ5NMKBM.js +0 -2
- package/dist/bundle/chunks/timeout-37GM7IIL.js +0 -2
- package/dist/bundle/chunks/xan-view-FOCYCKZQ.js +0 -2
- package/dist/bundle/chunks/yq-ZRNZKDLE.js +0 -2
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
+
import{a as pc}from"./chunk-6RK4AAB7.js";import{a as Cr,b as Ye,c as kr,d as xr}from"./chunk-YUITEK6N.js";import{d as ve}from"./chunk-UUIYAOD4.js";import{a as vr,b as Tr}from"./chunk-654CJKE3.js";import{a as Zs}from"./chunk-A6SU3BZX.js";import{e as Ft}from"./chunk-ZUEPJPYA.js";import{l as G}from"./chunk-TVCZIH6M.js";import{a as Ke,d as Nr}from"./chunk-GN6CQ3J4.js";import{a as ei}from"./chunk-FOCWZZDE.js";import{a as Ar,b as Er,c as pe}from"./chunk-QAYAQNCG.js";import{a as $t,b as w,c as Qs}from"./chunk-NCUTH6QL.js";var lo=w((Ty,ao)=>{var{hasOwnProperty:xi}=Object.prototype,Oi=(t,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let s=e.platform==="win32"?`\r
|
|
3
|
+
`:`
|
|
4
|
+
`,i=e.whitespace?" = ":"=",n=[],r=e.sort?Object.keys(t).sort():Object.keys(t),o=0;e.align&&(o=te(r.filter(c=>t[c]===null||Array.isArray(t[c])||typeof t[c]!="object").map(c=>Array.isArray(t[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>te(c).length>=te(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of r){let u=t[c];if(u&&Array.isArray(u))for(let f of u)a+=te(`${c}${l}`).padEnd(o," ")+i+te(f)+s;else u&&typeof u=="object"?n.push(c):a+=te(c).padEnd(o," ")+i+te(u)+s}e.section&&a.length&&(a="["+te(e.section)+"]"+(e.newline?s+s:s)+a);for(let c of n){let u=ro(c,".").join("\\."),f=(e.section?e.section+".":"")+u,d=Oi(t[c],{...e,section:f});a.length&&d.length&&(a+=s),a+=d}return a};function ro(t,e){var s=0,i=0,n=0,r=[];do if(n=t.indexOf(e,s),n!==-1){if(s=n+e.length,n>0&&t[n-1]==="\\")continue;r.push(t.slice(i,n)),i=n+e.length}while(n!==-1);return r.push(t.slice(i)),r}var no=(t,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let s=Object.create(null),i=s,n=null,r=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=t.split(/[\r\n]+/g),a={};for(let c of o){if(!c||c.match(/^\s*[;#]/)||c.match(/^\s*$/))continue;let u=c.match(r);if(!u)continue;if(u[1]!==void 0){if(n=Jt(u[1]),n==="__proto__"){i=Object.create(null);continue}i=s[n]=s[n]||Object.create(null);continue}let f=Jt(u[2]),d;e.bracketedArray?d=f.length>2&&f.slice(-2)==="[]":(a[f]=(a?.[f]||0)+1,d=a[f]>1);let h=d&&f.endsWith("[]")?f.slice(0,-2):f;if(h==="__proto__")continue;let g=u[3]?Jt(u[4]):!0,p=g==="true"||g==="false"||g==="null"?JSON.parse(g):g;d&&(xi.call(i,h)?Array.isArray(i[h])||(i[h]=[i[h]]):i[h]=[]),Array.isArray(i[h])?i[h].push(p):i[h]=p}let l=[];for(let c of Object.keys(s)){if(!xi.call(s,c)||typeof s[c]!="object"||Array.isArray(s[c]))continue;let u=ro(c,".");i=s;let f=u.pop(),d=f.replace(/\\\./g,".");for(let h of u)h!=="__proto__"&&((!xi.call(i,h)||typeof i[h]!="object")&&(i[h]=Object.create(null)),i=i[h]);i===s&&d===f||(i[d]=s[c],l.push(c))}for(let c of l)delete s[c];return s},oo=t=>t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"),te=t=>typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&oo(t)||t!==t.trim()?JSON.stringify(t):t.split(";").join("\\;").split("#").join("\\#"),Jt=t=>{if(t=(t||"").trim(),oo(t)){t.charAt(0)==="'"&&(t=t.slice(1,-1));try{t=JSON.parse(t)}catch{}}else{let e=!1,s="";for(let i=0,n=t.length;i<n;i++){let r=t.charAt(i);if(e)"\\;#".indexOf(r)!==-1?s+=r:s+="\\"+r,e=!1;else{if(";#".indexOf(r)!==-1)break;r==="\\"?e=!0:s+=r}}return e&&(s+="\\"),s.trim()}return t};ao.exports={parse:no,decode:no,stringify:Oi,encode:Oi,safe:te,unsafe:Jt}});var k=w(P=>{"use strict";var Mi=Symbol.for("yaml.alias"),bo=Symbol.for("yaml.document"),Zt=Symbol.for("yaml.map"),wo=Symbol.for("yaml.pair"),$i=Symbol.for("yaml.scalar"),es=Symbol.for("yaml.seq"),se=Symbol.for("yaml.node.type"),Qu=t=>!!t&&typeof t=="object"&&t[se]===Mi,Zu=t=>!!t&&typeof t=="object"&&t[se]===bo,ef=t=>!!t&&typeof t=="object"&&t[se]===Zt,tf=t=>!!t&&typeof t=="object"&&t[se]===wo,So=t=>!!t&&typeof t=="object"&&t[se]===$i,sf=t=>!!t&&typeof t=="object"&&t[se]===es;function No(t){if(t&&typeof t=="object")switch(t[se]){case Zt:case es:return!0}return!1}function nf(t){if(t&&typeof t=="object")switch(t[se]){case Mi:case Zt:case $i:case es:return!0}return!1}var rf=t=>(So(t)||No(t))&&!!t.anchor;P.ALIAS=Mi;P.DOC=bo;P.MAP=Zt;P.NODE_TYPE=se;P.PAIR=wo;P.SCALAR=$i;P.SEQ=es;P.hasAnchor=rf;P.isAlias=Qu;P.isCollection=No;P.isDocument=Zu;P.isMap=ef;P.isNode=nf;P.isPair=tf;P.isScalar=So;P.isSeq=sf});var rt=w(Fi=>{"use strict";var _=k(),B=Symbol("break visit"),Ao=Symbol("skip children"),Z=Symbol("remove node");function ts(t,e){let s=Eo(e);_.isDocument(t)?_e(null,t.contents,s,Object.freeze([t]))===Z&&(t.contents=null):_e(null,t,s,Object.freeze([]))}ts.BREAK=B;ts.SKIP=Ao;ts.REMOVE=Z;function _e(t,e,s,i){let n=vo(t,e,s,i);if(_.isNode(n)||_.isPair(n))return To(t,i,n),_e(t,n,s,i);if(typeof n!="symbol"){if(_.isCollection(e)){i=Object.freeze(i.concat(e));for(let r=0;r<e.items.length;++r){let o=_e(r,e.items[r],s,i);if(typeof o=="number")r=o-1;else{if(o===B)return B;o===Z&&(e.items.splice(r,1),r-=1)}}}else if(_.isPair(e)){i=Object.freeze(i.concat(e));let r=_e("key",e.key,s,i);if(r===B)return B;r===Z&&(e.key=null);let o=_e("value",e.value,s,i);if(o===B)return B;o===Z&&(e.value=null)}}return n}async function ss(t,e){let s=Eo(e);_.isDocument(t)?await Pe(null,t.contents,s,Object.freeze([t]))===Z&&(t.contents=null):await Pe(null,t,s,Object.freeze([]))}ss.BREAK=B;ss.SKIP=Ao;ss.REMOVE=Z;async function Pe(t,e,s,i){let n=await vo(t,e,s,i);if(_.isNode(n)||_.isPair(n))return To(t,i,n),Pe(t,n,s,i);if(typeof n!="symbol"){if(_.isCollection(e)){i=Object.freeze(i.concat(e));for(let r=0;r<e.items.length;++r){let o=await Pe(r,e.items[r],s,i);if(typeof o=="number")r=o-1;else{if(o===B)return B;o===Z&&(e.items.splice(r,1),r-=1)}}}else if(_.isPair(e)){i=Object.freeze(i.concat(e));let r=await Pe("key",e.key,s,i);if(r===B)return B;r===Z&&(e.key=null);let o=await Pe("value",e.value,s,i);if(o===B)return B;o===Z&&(e.value=null)}}return n}function Eo(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function vo(t,e,s,i){if(typeof s=="function")return s(t,e,i);if(_.isMap(e))return s.Map?.(t,e,i);if(_.isSeq(e))return s.Seq?.(t,e,i);if(_.isPair(e))return s.Pair?.(t,e,i);if(_.isScalar(e))return s.Scalar?.(t,e,i);if(_.isAlias(e))return s.Alias?.(t,e,i)}function To(t,e,s){let i=e[e.length-1];if(_.isCollection(i))i.items[t]=s;else if(_.isPair(i))t==="key"?i.key=s:i.value=s;else if(_.isDocument(i))i.contents=s;else{let n=_.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${n} parent`)}}Fi.visit=ts;Fi.visitAsync=ss});var Ri=w(ko=>{"use strict";var Co=k(),of=rt(),af={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},lf=t=>t.replace(/[!,[\]{}]/g,e=>af[e]),ot=class t{constructor(e,s){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},t.defaultYaml,e),this.tags=Object.assign({},t.defaultTags,s)}clone(){let e=new t(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new t(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:t.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},t.defaultTags);break}return e}add(e,s){this.atNextDocument&&(this.yaml={explicit:t.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},t.defaultTags),this.atNextDocument=!1);let i=e.trim().split(/[ \t]+/),n=i.shift();switch(n){case"%TAG":{if(i.length!==2&&(s(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[r,o]=i;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return s(0,"%YAML directive should contain exactly one part"),!1;let[r]=i;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return s(6,`Unsupported YAML version ${r}`,o),!1}}default:return s(0,`Unknown directive ${n}`,!0),!1}}tagName(e,s){if(e==="!")return"!";if(e[0]!=="!")return s(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(s(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&s("Verbatim tags must end with a >"),o)}let[,i,n]=e.match(/^(.*!)([^!]*)$/s);n||s(`The ${e} tag has no suffix`);let r=this.tags[i];if(r)try{return r+decodeURIComponent(n)}catch(o){return s(String(o)),null}return i==="!"?e:(s(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[s,i]of Object.entries(this.tags))if(e.startsWith(i))return s+lf(e.substring(i.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let s=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),n;if(e&&i.length>0&&Co.isNode(e.contents)){let r={};of.visit(e.contents,(o,a)=>{Co.isNode(a)&&a.tag&&(r[a.tag]=!0)}),n=Object.keys(r)}else n=[];for(let[r,o]of i)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||n.some(a=>a.startsWith(o)))&&s.push(`%TAG ${r} ${o}`);return s.join(`
|
|
5
|
+
`)}};ot.defaultYaml={explicit:!1,version:"1.2"};ot.defaultTags={"!!":"tag:yaml.org,2002:"};ko.Directives=ot});var is=w(at=>{"use strict";var xo=k(),cf=rt();function uf(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){let s=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(s)}return!0}function Oo(t){let e=new Set;return cf.visit(t,{Value(s,i){i.anchor&&e.add(i.anchor)}}),e}function Lo(t,e){for(let s=1;;++s){let i=`${t}${s}`;if(!e.has(i))return i}}function ff(t,e){let s=[],i=new Map,n=null;return{onAnchor:r=>{s.push(r),n??(n=Oo(t));let o=Lo(e,n);return n.add(o),o},setAnchors:()=>{for(let r of s){let o=i.get(r);if(typeof o=="object"&&o.anchor&&(xo.isScalar(o.node)||xo.isCollection(o.node)))o.node.anchor=o.anchor;else{let a=new Error("Failed to resolve repeated object (this should not happen)");throw a.source=r,a}}},sourceObjects:i}}at.anchorIsValid=uf;at.anchorNames=Oo;at.createNodeAnchors=ff;at.findNewAnchor=Lo});var ji=w(Io=>{"use strict";function lt(t,e,s,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let n=0,r=i.length;n<r;++n){let o=i[n],a=lt(t,i,String(n),o);a===void 0?delete i[n]:a!==o&&(i[n]=a)}else if(i instanceof Map)for(let n of Array.from(i.keys())){let r=i.get(n),o=lt(t,i,n,r);o===void 0?i.delete(n):o!==r&&i.set(n,o)}else if(i instanceof Set)for(let n of Array.from(i)){let r=lt(t,i,n,n);r===void 0?i.delete(n):r!==n&&(i.delete(n),i.add(r))}else for(let[n,r]of Object.entries(i)){let o=lt(t,i,n,r);o===void 0?delete i[n]:o!==r&&(i[n]=o)}return t.call(e,s,i)}Io.applyReviver=lt});var ne=w(_o=>{"use strict";var df=k();function qo(t,e,s){if(Array.isArray(t))return t.map((i,n)=>qo(i,String(n),s));if(t&&typeof t.toJSON=="function"){if(!s||!df.hasAnchor(t))return t.toJSON(e,s);let i={aliasCount:0,count:1,res:void 0};s.anchors.set(t,i),s.onCreate=r=>{i.res=r,delete s.onCreate};let n=t.toJSON(e,s);return s.onCreate&&s.onCreate(n),n}return typeof t=="bigint"&&!s?.keep?Number(t):t}_o.toJS=qo});var ns=w(Mo=>{"use strict";var hf=ji(),Po=k(),pf=ne(),Bi=class{constructor(e){Object.defineProperty(this,Po.NODE_TYPE,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:s,maxAliasCount:i,onAnchor:n,reviver:r}={}){if(!Po.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=pf.toJS(this,"",o);if(typeof n=="function")for(let{count:l,res:c}of o.anchors.values())n(c,l);return typeof r=="function"?hf.applyReviver(r,{"":a},"",a):a}};Mo.NodeBase=Bi});var ct=w($o=>{"use strict";var mf=is(),gf=rt(),Me=k(),yf=ns(),bf=ne(),Di=class extends yf.NodeBase{constructor(e){super(Me.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,s){if(s?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;s?.aliasResolveCache?i=s.aliasResolveCache:(i=[],gf.visit(e,{Node:(r,o)=>{(Me.isAlias(o)||Me.hasAnchor(o))&&i.push(o)}}),s&&(s.aliasResolveCache=i));let n;for(let r of i){if(r===this)break;r.anchor===this.source&&(n=r)}return n}toJSON(e,s){if(!s)return{source:this.source};let{anchors:i,doc:n,maxAliasCount:r}=s,o=this.resolve(n,s);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=i.get(o);if(a||(bf.toJS(o,null,s),a=i.get(o)),a?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(r>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=rs(n,o,i)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,s,i){let n=`*${this.source}`;if(e){if(mf.anchorIsValid(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${n} `}return n}};function rs(t,e,s){if(Me.isAlias(e)){let i=e.resolve(t),n=s&&i&&s.get(i);return n?n.count*n.aliasCount:0}else if(Me.isCollection(e)){let i=0;for(let n of e.items){let r=rs(t,n,s);r>i&&(i=r)}return i}else if(Me.isPair(e)){let i=rs(t,e.key,s),n=rs(t,e.value,s);return Math.max(i,n)}return 1}$o.Alias=Di});var I=w(Vi=>{"use strict";var wf=k(),Sf=ns(),Nf=ne(),Af=t=>!t||typeof t!="function"&&typeof t!="object",re=class extends Sf.NodeBase{constructor(e){super(wf.SCALAR),this.value=e}toJSON(e,s){return s?.keep?this.value:Nf.toJS(this.value,e,s)}toString(){return String(this.value)}};re.BLOCK_FOLDED="BLOCK_FOLDED";re.BLOCK_LITERAL="BLOCK_LITERAL";re.PLAIN="PLAIN";re.QUOTE_DOUBLE="QUOTE_DOUBLE";re.QUOTE_SINGLE="QUOTE_SINGLE";Vi.Scalar=re;Vi.isScalarValue=Af});var ut=w(Ro=>{"use strict";var Ef=ct(),ye=k(),Fo=I(),vf="tag:yaml.org,2002:";function Tf(t,e,s){if(e){let i=s.filter(r=>r.tag===e),n=i.find(r=>!r.format)??i[0];if(!n)throw new Error(`Tag ${e} not found`);return n}return s.find(i=>i.identify?.(t)&&!i.format)}function Cf(t,e,s){if(ye.isDocument(t)&&(t=t.contents),ye.isNode(t))return t;if(ye.isPair(t)){let f=s.schema[ye.MAP].createNode?.(s.schema,null,s);return f.items.push(t),f}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());let{aliasDuplicateObjects:i,onAnchor:n,onTagObj:r,schema:o,sourceObjects:a}=s,l;if(i&&t&&typeof t=="object"){if(l=a.get(t),l)return l.anchor??(l.anchor=n(t)),new Ef.Alias(l.anchor);l={anchor:null,node:null},a.set(t,l)}e?.startsWith("!!")&&(e=vf+e.slice(2));let c=Tf(t,e,o.tags);if(!c){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){let f=new Fo.Scalar(t);return l&&(l.node=f),f}c=t instanceof Map?o[ye.MAP]:Symbol.iterator in Object(t)?o[ye.SEQ]:o[ye.MAP]}r&&(r(c),delete s.onTagObj);let u=c?.createNode?c.createNode(s.schema,t,s):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(s.schema,t,s):new Fo.Scalar(t);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}Ro.createNode=Cf});var as=w(os=>{"use strict";var kf=ut(),ee=k(),xf=ns();function Ui(t,e,s){let i=s;for(let n=e.length-1;n>=0;--n){let r=e[n];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=i,i=o}else i=new Map([[r,i]])}return kf.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}var jo=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done,Ki=class extends xf.NodeBase{constructor(e,s){super(e),Object.defineProperty(this,"schema",{value:s,configurable:!0,enumerable:!1,writable:!0})}clone(e){let s=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(s.schema=e),s.items=s.items.map(i=>ee.isNode(i)||ee.isPair(i)?i.clone(e):i),this.range&&(s.range=this.range.slice()),s}addIn(e,s){if(jo(e))this.add(s);else{let[i,...n]=e,r=this.get(i,!0);if(ee.isCollection(r))r.addIn(n,s);else if(r===void 0&&this.schema)this.set(i,Ui(this.schema,n,s));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}deleteIn(e){let[s,...i]=e;if(i.length===0)return this.delete(s);let n=this.get(s,!0);if(ee.isCollection(n))return n.deleteIn(i);throw new Error(`Expected YAML collection at ${s}. Remaining path: ${i}`)}getIn(e,s){let[i,...n]=e,r=this.get(i,!0);return n.length===0?!s&&ee.isScalar(r)?r.value:r:ee.isCollection(r)?r.getIn(n,s):void 0}hasAllNullValues(e){return this.items.every(s=>{if(!ee.isPair(s))return!1;let i=s.value;return i==null||e&&ee.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(e){let[s,...i]=e;if(i.length===0)return this.has(s);let n=this.get(s,!0);return ee.isCollection(n)?n.hasIn(i):!1}setIn(e,s){let[i,...n]=e;if(n.length===0)this.set(i,s);else{let r=this.get(i,!0);if(ee.isCollection(r))r.setIn(n,s);else if(r===void 0&&this.schema)this.set(i,Ui(this.schema,n,s));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${n}`)}}};os.Collection=Ki;os.collectionFromPath=Ui;os.isEmptyPath=jo});var ft=w(ls=>{"use strict";var Of=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Yi(t,e){return/^\n+$/.test(t)?t.substring(1):e?t.replace(/^(?! *$)/gm,e):t}var Lf=(t,e,s)=>t.endsWith(`
|
|
6
|
+
`)?Yi(s,e):s.includes(`
|
|
7
|
+
`)?`
|
|
8
|
+
`+Yi(s,e):(t.endsWith(" ")?"":" ")+s;ls.indentComment=Yi;ls.lineComment=Lf;ls.stringifyComment=Of});var Do=w(dt=>{"use strict";var If="flow",Hi="block",cs="quoted";function qf(t,e,s="flow",{indentAtStart:i,lineWidth:n=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!n||n<0)return t;n<r&&(r=0);let l=Math.max(1+r,1+n-e.length);if(t.length<=l)return t;let c=[],u={},f=n-e.length;typeof i=="number"&&(i>n-Math.max(2,r)?c.push(0):f=n-i);let d,h,g=!1,p=-1,m=-1,b=-1;s===Hi&&(p=Bo(t,p,e.length),p!==-1&&(f=p+l));for(let A;A=t[p+=1];){if(s===cs&&A==="\\"){switch(m=p,t[p+1]){case"x":p+=3;break;case"u":p+=5;break;case"U":p+=9;break;default:p+=1}b=p}if(A===`
|
|
9
|
+
`)s===Hi&&(p=Bo(t,p,e.length)),f=p+e.length+l,d=void 0;else{if(A===" "&&h&&h!==" "&&h!==`
|
|
10
|
+
`&&h!==" "){let S=t[p+1];S&&S!==" "&&S!==`
|
|
11
|
+
`&&S!==" "&&(d=p)}if(p>=f)if(d)c.push(d),f=d+l,d=void 0;else if(s===cs){for(;h===" "||h===" ";)h=A,A=t[p+=1],g=!0;let S=p>b+1?p-2:m-1;if(u[S])return t;c.push(S),u[S]=!0,f=S+l,d=void 0}else g=!0}h=A}if(g&&a&&a(),c.length===0)return t;o&&o();let y=t.slice(0,c[0]);for(let A=0;A<c.length;++A){let S=c[A],v=c[A+1]||t.length;S===0?y=`
|
|
12
|
+
${e}${t.slice(0,v)}`:(s===cs&&u[S]&&(y+=`${t[S]}\\`),y+=`
|
|
13
|
+
${e}${t.slice(S+1,v)}`)}return y}function Bo(t,e,s){let i=e,n=e+1,r=t[n];for(;r===" "||r===" ";)if(e<n+s)r=t[++e];else{do r=t[++e];while(r&&r!==`
|
|
14
|
+
`);i=e,n=e+1,r=t[n]}return i}dt.FOLD_BLOCK=Hi;dt.FOLD_FLOW=If;dt.FOLD_QUOTED=cs;dt.foldFlowLines=qf});var pt=w(Vo=>{"use strict";var W=I(),oe=Do(),fs=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),ds=t=>/^(%|---|\.\.\.)/m.test(t);function _f(t,e,s){if(!e||e<0)return!1;let i=e-s,n=t.length;if(n<=i)return!1;for(let r=0,o=0;r<n;++r)if(t[r]===`
|
|
15
|
+
`){if(r-o>i)return!0;if(o=r+1,n-o<=i)return!1}return!0}function ht(t,e){let s=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return s;let{implicitKey:i}=e,n=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(ds(t)?" ":""),o="",a=0;for(let l=0,c=s[l];c;c=s[++l])if(c===" "&&s[l+1]==="\\"&&s[l+2]==="n"&&(o+=s.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(s[l+1]){case"u":{o+=s.slice(a,l);let u=s.substr(l+2,4);switch(u){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:u.substr(0,2)==="00"?o+="\\x"+u.substr(2):o+=s.substr(l,6)}l+=5,a=l+1}break;case"n":if(i||s[l+2]==='"'||s.length<n)l+=1;else{for(o+=s.slice(a,l)+`
|
|
16
|
+
|
|
17
|
+
`;s[l+2]==="\\"&&s[l+3]==="n"&&s[l+4]!=='"';)o+=`
|
|
18
|
+
`,l+=2;o+=r,s[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+s.slice(a):s,i?o:oe.foldFlowLines(o,r,oe.FOLD_QUOTED,fs(e,!1))}function Gi(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
|
19
|
+
`)||/[ \t]\n|\n[ \t]/.test(t))return ht(t,e);let s=e.indent||(ds(t)?" ":""),i="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
20
|
+
${s}`)+"'";return e.implicitKey?i:oe.foldFlowLines(i,s,oe.FOLD_FLOW,fs(e,!1))}function $e(t,e){let{singleQuote:s}=e.options,i;if(s===!1)i=ht;else{let n=t.includes('"'),r=t.includes("'");n&&!r?i=Gi:r&&!n?i=ht:i=s?Gi:ht}return i(t,e)}var Ji;try{Ji=new RegExp(`(^|(?<!
|
|
21
|
+
))
|
|
22
|
+
+(?!
|
|
23
|
+
|$)`,"g")}catch{Ji=/\n+(?!\n|$)/g}function us({comment:t,type:e,value:s},i,n,r){let{blockQuote:o,commentString:a,lineWidth:l}=i.options;if(!o||/\n[\t ]+$/.test(s))return $e(s,i);let c=i.indent||(i.forceBlockIndent||ds(s)?" ":""),u=o==="literal"?!0:o==="folded"||e===W.Scalar.BLOCK_FOLDED?!1:e===W.Scalar.BLOCK_LITERAL?!0:!_f(s,l,c.length);if(!s)return u?`|
|
|
24
|
+
`:`>
|
|
25
|
+
`;let f,d;for(d=s.length;d>0;--d){let v=s[d-1];if(v!==`
|
|
26
|
+
`&&v!==" "&&v!==" ")break}let h=s.substring(d),g=h.indexOf(`
|
|
27
|
+
`);g===-1?f="-":s===h||g!==h.length-1?(f="+",r&&r()):f="",h&&(s=s.slice(0,-h.length),h[h.length-1]===`
|
|
28
|
+
`&&(h=h.slice(0,-1)),h=h.replace(Ji,`$&${c}`));let p=!1,m,b=-1;for(m=0;m<s.length;++m){let v=s[m];if(v===" ")p=!0;else if(v===`
|
|
29
|
+
`)b=m;else break}let y=s.substring(0,b<m?b+1:m);y&&(s=s.substring(y.length),y=y.replace(/\n+/g,`$&${c}`));let S=(p?c?"2":"1":"")+f;if(t&&(S+=" "+a(t.replace(/ ?[\r\n]+/g," ")),n&&n()),!u){let v=s.replace(/\n+/g,`
|
|
30
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),E=!1,C=fs(i,!0);o!=="folded"&&e!==W.Scalar.BLOCK_FOLDED&&(C.onOverflow=()=>{E=!0});let N=oe.foldFlowLines(`${y}${v}${h}`,c,oe.FOLD_BLOCK,C);if(!E)return`>${S}
|
|
31
|
+
${c}${N}`}return s=s.replace(/\n+/g,`$&${c}`),`|${S}
|
|
32
|
+
${c}${y}${s}${h}`}function Pf(t,e,s,i){let{type:n,value:r}=t,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&r.includes(`
|
|
33
|
+
`)||u&&/[[\]{},]/.test(r))return $e(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||u||!r.includes(`
|
|
34
|
+
`)?$e(r,e):us(t,e,s,i);if(!a&&!u&&n!==W.Scalar.PLAIN&&r.includes(`
|
|
35
|
+
`))return us(t,e,s,i);if(ds(r)){if(l==="")return e.forceBlockIndent=!0,us(t,e,s,i);if(a&&l===c)return $e(r,e)}let f=r.replace(/\n+/g,`$&
|
|
36
|
+
${l}`);if(o){let d=p=>p.default&&p.tag!=="tag:yaml.org,2002:str"&&p.test?.test(f),{compat:h,tags:g}=e.doc.schema;if(g.some(d)||h?.some(d))return $e(r,e)}return a?f:oe.foldFlowLines(f,l,oe.FOLD_FLOW,fs(e,!1))}function Mf(t,e,s,i){let{implicitKey:n,inFlow:r}=e,o=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)}),{type:a}=t;a!==W.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=W.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case W.Scalar.BLOCK_FOLDED:case W.Scalar.BLOCK_LITERAL:return n||r?$e(o.value,e):us(o,e,s,i);case W.Scalar.QUOTE_DOUBLE:return ht(o.value,e);case W.Scalar.QUOTE_SINGLE:return Gi(o.value,e);case W.Scalar.PLAIN:return Pf(o,e,s,i);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=n&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}Vo.stringifyString=Mf});var mt=w(Wi=>{"use strict";var $f=is(),ae=k(),Ff=ft(),Rf=pt();function jf(t,e){let s=Object.assign({blockQuote:!0,commentString:Ff.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e),i;switch(s.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:t,flowCollectionPadding:s.flowCollectionPadding?" ":"",indent:"",indentStep:typeof s.indent=="number"?" ".repeat(s.indent):" ",inFlow:i,options:s}}function Bf(t,e){if(e.tag){let n=t.filter(r=>r.tag===e.tag);if(n.length>0)return n.find(r=>r.format===e.format)??n[0]}let s,i;if(ae.isScalar(e)){i=e.value;let n=t.filter(r=>r.identify?.(i));if(n.length>1){let r=n.filter(o=>o.test);r.length>0&&(n=r)}s=n.find(r=>r.format===e.format)??n.find(r=>!r.format)}else i=e,s=t.find(n=>n.nodeClass&&i instanceof n.nodeClass);if(!s){let n=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${n} value`)}return s}function Df(t,e,{anchors:s,doc:i}){if(!i.directives)return"";let n=[],r=(ae.isScalar(t)||ae.isCollection(t))&&t.anchor;r&&$f.anchorIsValid(r)&&(s.add(r),n.push(`&${r}`));let o=t.tag??(e.default?null:e.tag);return o&&n.push(i.directives.tagString(o)),n.join(" ")}function Vf(t,e,s,i){if(ae.isPair(t))return t.toString(e,s,i);if(ae.isAlias(t)){if(e.doc.directives)return t.toString(e);if(e.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let n,r=ae.isNode(t)?t:e.doc.createNode(t,{onTagObj:l=>n=l});n??(n=Bf(e.doc.schema.tags,r));let o=Df(r,n,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof n.stringify=="function"?n.stringify(r,e,s,i):ae.isScalar(r)?Rf.stringifyString(r,e,s,i):r.toString(e,s,i);return o?ae.isScalar(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
37
|
+
${e.indent}${a}`:a}Wi.createStringifyContext=jf;Wi.stringify=Vf});var Ho=w(Yo=>{"use strict";var ie=k(),Uo=I(),Ko=mt(),gt=ft();function Uf({key:t,value:e},s,i,n){let{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=s,d=ie.isNode(t)&&t.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(ie.isCollection(t)||!ie.isNode(t)&&typeof t=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let h=!f&&(!t||d&&e==null&&!s.inFlow||ie.isCollection(t)||(ie.isScalar(t)?t.type===Uo.Scalar.BLOCK_FOLDED||t.type===Uo.Scalar.BLOCK_LITERAL:typeof t=="object"));s=Object.assign({},s,{allNullValues:!1,implicitKey:!h&&(f||!r),indent:a+l});let g=!1,p=!1,m=Ko.stringify(t,s,()=>g=!0,()=>p=!0);if(!h&&!s.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(s.inFlow){if(r||e==null)return g&&i&&i(),m===""?"?":h?`? ${m}`:m}else if(r&&!f||e==null&&h)return m=`? ${m}`,d&&!g?m+=gt.lineComment(m,s.indent,c(d)):p&&n&&n(),m;g&&(d=null),h?(d&&(m+=gt.lineComment(m,s.indent,c(d))),m=`? ${m}
|
|
38
|
+
${a}:`):(m=`${m}:`,d&&(m+=gt.lineComment(m,s.indent,c(d))));let b,y,A;ie.isNode(e)?(b=!!e.spaceBefore,y=e.commentBefore,A=e.comment):(b=!1,y=null,A=null,e&&typeof e=="object"&&(e=o.createNode(e))),s.implicitKey=!1,!h&&!d&&ie.isScalar(e)&&(s.indentAtStart=m.length+1),p=!1,!u&&l.length>=2&&!s.inFlow&&!h&&ie.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(s.indent=s.indent.substring(2));let S=!1,v=Ko.stringify(e,s,()=>S=!0,()=>p=!0),E=" ";if(d||b||y){if(E=b?`
|
|
39
|
+
`:"",y){let C=c(y);E+=`
|
|
40
|
+
${gt.indentComment(C,s.indent)}`}v===""&&!s.inFlow?E===`
|
|
41
|
+
`&&A&&(E=`
|
|
42
|
+
|
|
43
|
+
`):E+=`
|
|
44
|
+
${s.indent}`}else if(!h&&ie.isCollection(e)){let C=v[0],N=v.indexOf(`
|
|
45
|
+
`),O=N!==-1,Y=s.inFlow??e.flow??e.items.length===0;if(O||!Y){let Ee=!1;if(O&&(C==="&"||C==="!")){let q=v.indexOf(" ");C==="&"&&q!==-1&&q<N&&v[q+1]==="!"&&(q=v.indexOf(" ",q+1)),(q===-1||N<q)&&(Ee=!0)}Ee||(E=`
|
|
46
|
+
${s.indent}`)}}else(v===""||v[0]===`
|
|
47
|
+
`)&&(E="");return m+=E+v,s.inFlow?S&&i&&i():A&&!S?m+=gt.lineComment(m,s.indent,c(A)):p&&n&&n(),m}Yo.stringifyPair=Uf});var Xi=w(zi=>{"use strict";var Go=$t("process");function Kf(t,...e){t==="debug"&&console.log(...e)}function Yf(t,e){(t==="debug"||t==="warn")&&(typeof Go.emitWarning=="function"?Go.emitWarning(e):console.warn(e))}zi.debug=Kf;zi.warn=Yf});var ys=w(gs=>{"use strict";var ms=k(),Jo=I(),hs="<<",ps={identify:t=>t===hs||typeof t=="symbol"&&t.description===hs,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Jo.Scalar(Symbol(hs)),{addToJSMap:Wo}),stringify:()=>hs},Hf=(t,e)=>(ps.identify(e)||ms.isScalar(e)&&(!e.type||e.type===Jo.Scalar.PLAIN)&&ps.identify(e.value))&&t?.doc.schema.tags.some(s=>s.tag===ps.tag&&s.default);function Wo(t,e,s){let i=zo(t,s);if(ms.isSeq(i))for(let n of i.items)Qi(t,e,n);else if(Array.isArray(i))for(let n of i)Qi(t,e,n);else Qi(t,e,i)}function Qi(t,e,s){let i=zo(t,s);if(!ms.isMap(i))throw new Error("Merge sources must be maps or map aliases");let n=i.toJSON(null,t,Map);for(let[r,o]of n)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function zo(t,e){return t&&ms.isAlias(e)?e.resolve(t.doc,t):e}gs.addMergeToJSMap=Wo;gs.isMergeKey=Hf;gs.merge=ps});var en=w(Zo=>{"use strict";var Gf=Xi(),Xo=ys(),Jf=mt(),Qo=k(),Zi=ne();function Wf(t,e,{key:s,value:i}){if(Qo.isNode(s)&&s.addToJSMap)s.addToJSMap(t,e,i);else if(Xo.isMergeKey(t,s))Xo.addMergeToJSMap(t,e,i);else{let n=Zi.toJS(s,"",t);if(e instanceof Map)e.set(n,Zi.toJS(i,n,t));else if(e instanceof Set)e.add(n);else{let r=zf(s,n,t),o=Zi.toJS(i,r,t);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function zf(t,e,s){if(e===null)return"";if(typeof e!="object")return String(e);if(Qo.isNode(t)&&s?.doc){let i=Jf.createStringifyContext(s.doc,{});i.anchors=new Set;for(let r of s.anchors.keys())i.anchors.add(r.anchor);i.inFlow=!0,i.inStringifyKey=!0;let n=t.toString(i);if(!s.mapKeyWarned){let r=JSON.stringify(n);r.length>40&&(r=r.substring(0,36)+'..."'),Gf.warn(s.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),s.mapKeyWarned=!0}return n}return JSON.stringify(e)}Zo.addPairToJSMap=Wf});var le=w(tn=>{"use strict";var ea=ut(),Xf=Ho(),Qf=en(),bs=k();function Zf(t,e,s){let i=ea.createNode(t,void 0,s),n=ea.createNode(e,void 0,s);return new ws(i,n)}var ws=class t{constructor(e,s=null){Object.defineProperty(this,bs.NODE_TYPE,{value:bs.PAIR}),this.key=e,this.value=s}clone(e){let{key:s,value:i}=this;return bs.isNode(s)&&(s=s.clone(e)),bs.isNode(i)&&(i=i.clone(e)),new t(s,i)}toJSON(e,s){let i=s?.mapAsMap?new Map:{};return Qf.addPairToJSMap(s,i,this)}toString(e,s,i){return e?.doc?Xf.stringifyPair(this,e,s,i):JSON.stringify(this)}};tn.Pair=ws;tn.createPair=Zf});var sn=w(sa=>{"use strict";var be=k(),ta=mt(),Ss=ft();function ed(t,e,s){return(e.inFlow??t.flow?sd:td)(t,e,s)}function td({comment:t,items:e},s,{blockItemPrefix:i,flowChars:n,itemIndent:r,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=s,u=Object.assign({},s,{indent:r,type:null}),f=!1,d=[];for(let g=0;g<e.length;++g){let p=e[g],m=null;if(be.isNode(p))!f&&p.spaceBefore&&d.push(""),Ns(s,d,p.commentBefore,f),p.comment&&(m=p.comment);else if(be.isPair(p)){let y=be.isNode(p.key)?p.key:null;y&&(!f&&y.spaceBefore&&d.push(""),Ns(s,d,y.commentBefore,f))}f=!1;let b=ta.stringify(p,u,()=>m=null,()=>f=!0);m&&(b+=Ss.lineComment(b,r,c(m))),f&&m&&(f=!1),d.push(i+b)}let h;if(d.length===0)h=n.start+n.end;else{h=d[0];for(let g=1;g<d.length;++g){let p=d[g];h+=p?`
|
|
48
|
+
${l}${p}`:`
|
|
49
|
+
`}}return t?(h+=`
|
|
50
|
+
`+Ss.indentComment(c(t),l),a&&a()):f&&o&&o(),h}function sd({items:t},e,{flowChars:s,itemIndent:i}){let{indent:n,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;i+=r;let l=Object.assign({},e,{indent:i,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let g=0;g<t.length;++g){let p=t[g],m=null;if(be.isNode(p))p.spaceBefore&&f.push(""),Ns(e,f,p.commentBefore,!1),p.comment&&(m=p.comment);else if(be.isPair(p)){let y=be.isNode(p.key)?p.key:null;y&&(y.spaceBefore&&f.push(""),Ns(e,f,y.commentBefore,!1),y.comment&&(c=!0));let A=be.isNode(p.value)?p.value:null;A?(A.comment&&(m=A.comment),A.commentBefore&&(c=!0)):p.value==null&&y?.comment&&(m=y.comment)}m&&(c=!0);let b=ta.stringify(p,l,()=>m=null);c||(c=f.length>u||b.includes(`
|
|
51
|
+
`)),g<t.length-1?b+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(c||(c=f.reduce((y,A)=>y+A.length+2,2)+(b.length+2)>e.options.lineWidth)),c&&(b+=",")),m&&(b+=Ss.lineComment(b,i,a(m))),f.push(b),u=f.length}let{start:d,end:h}=s;if(f.length===0)return d+h;if(!c){let g=f.reduce((p,m)=>p+m.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=d;for(let p of f)g+=p?`
|
|
52
|
+
${r}${n}${p}`:`
|
|
53
|
+
`;return`${g}
|
|
54
|
+
${n}${h}`}else return`${d}${o}${f.join(" ")}${o}${h}`}function Ns({indent:t,options:{commentString:e}},s,i,n){if(i&&n&&(i=i.replace(/^\n+/,"")),i){let r=Ss.indentComment(e(i),t);s.push(r.trimStart())}}sa.stringifyCollection=ed});var ue=w(rn=>{"use strict";var id=sn(),nd=en(),rd=as(),ce=k(),As=le(),od=I();function yt(t,e){let s=ce.isScalar(e)?e.value:e;for(let i of t)if(ce.isPair(i)&&(i.key===e||i.key===s||ce.isScalar(i.key)&&i.key.value===s))return i}var nn=class extends rd.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(ce.MAP,e),this.items=[]}static from(e,s,i){let{keepUndefined:n,replacer:r}=i,o=new this(e),a=(l,c)=>{if(typeof r=="function")c=r.call(s,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||n)&&o.items.push(As.createPair(l,c,i))};if(s instanceof Map)for(let[l,c]of s)a(l,c);else if(s&&typeof s=="object")for(let l of Object.keys(s))a(l,s[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,s){let i;ce.isPair(e)?i=e:!e||typeof e!="object"||!("key"in e)?i=new As.Pair(e,e?.value):i=new As.Pair(e.key,e.value);let n=yt(this.items,i.key),r=this.schema?.sortMapEntries;if(n){if(!s)throw new Error(`Key ${i.key} already set`);ce.isScalar(n.value)&&od.isScalarValue(i.value)?n.value.value=i.value:n.value=i.value}else if(r){let o=this.items.findIndex(a=>r(i,a)<0);o===-1?this.items.push(i):this.items.splice(o,0,i)}else this.items.push(i)}delete(e){let s=yt(this.items,e);return s?this.items.splice(this.items.indexOf(s),1).length>0:!1}get(e,s){let n=yt(this.items,e)?.value;return(!s&&ce.isScalar(n)?n.value:n)??void 0}has(e){return!!yt(this.items,e)}set(e,s){this.add(new As.Pair(e,s),!0)}toJSON(e,s,i){let n=i?new i:s?.mapAsMap?new Map:{};s?.onCreate&&s.onCreate(n);for(let r of this.items)nd.addPairToJSMap(s,n,r);return n}toString(e,s,i){if(!e)return JSON.stringify(this);for(let n of this.items)if(!ce.isPair(n))throw new Error(`Map items must all be pairs; found ${JSON.stringify(n)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),id.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:i,onComment:s})}};rn.YAMLMap=nn;rn.findPair=yt});var Fe=w(na=>{"use strict";var ad=k(),ia=ue(),ld={collection:"map",default:!0,nodeClass:ia.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,e){return ad.isMap(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,s)=>ia.YAMLMap.from(t,e,s)};na.map=ld});var fe=w(ra=>{"use strict";var cd=ut(),ud=sn(),fd=as(),vs=k(),dd=I(),hd=ne(),on=class extends fd.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(vs.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let s=Es(e);return typeof s!="number"?!1:this.items.splice(s,1).length>0}get(e,s){let i=Es(e);if(typeof i!="number")return;let n=this.items[i];return!s&&vs.isScalar(n)?n.value:n}has(e){let s=Es(e);return typeof s=="number"&&s<this.items.length}set(e,s){let i=Es(e);if(typeof i!="number")throw new Error(`Expected a valid index, not ${e}.`);let n=this.items[i];vs.isScalar(n)&&dd.isScalarValue(s)?n.value=s:this.items[i]=s}toJSON(e,s){let i=[];s?.onCreate&&s.onCreate(i);let n=0;for(let r of this.items)i.push(hd.toJS(r,String(n++),s));return i}toString(e,s,i){return e?ud.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:i,onComment:s}):JSON.stringify(this)}static from(e,s,i){let{replacer:n}=i,r=new this(e);if(s&&Symbol.iterator in Object(s)){let o=0;for(let a of s){if(typeof n=="function"){let l=s instanceof Set?a:String(o++);a=n.call(s,l,a)}r.items.push(cd.createNode(a,void 0,i))}}return r}};function Es(t){let e=vs.isScalar(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}ra.YAMLSeq=on});var Re=w(aa=>{"use strict";var pd=k(),oa=fe(),md={collection:"seq",default:!0,nodeClass:oa.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,e){return pd.isSeq(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,s)=>oa.YAMLSeq.from(t,e,s)};aa.seq=md});var bt=w(la=>{"use strict";var gd=pt(),yd={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,s,i){return e=Object.assign({actualString:!0},e),gd.stringifyString(t,e,s,i)}};la.string=yd});var Ts=w(fa=>{"use strict";var ca=I(),ua={identify:t=>t==null,createNode:()=>new ca.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ca.Scalar(null),stringify:({source:t},e)=>typeof t=="string"&&ua.test.test(t)?t:e.options.nullStr};fa.nullTag=ua});var an=w(ha=>{"use strict";var bd=I(),da={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new bd.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},s){if(t&&da.test.test(t)){let i=t[0]==="t"||t[0]==="T";if(e===i)return t}return e?s.options.trueStr:s.options.falseStr}};ha.boolTag=da});var je=w(pa=>{"use strict";function wd({format:t,minFractionDigits:e,tag:s,value:i}){if(typeof i=="bigint")return String(i);let n=typeof i=="number"?i:Number(i);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let r=Object.is(i,-0)?"-0":JSON.stringify(i);if(!t&&e&&(!s||s==="tag:yaml.org,2002:float")&&/^-?\d/.test(r)&&!r.includes("e")){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let a=e-(r.length-o-1);for(;a-- >0;)r+="0"}return r}pa.stringifyNumber=wd});var cn=w(Cs=>{"use strict";var Sd=I(),ln=je(),Nd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:ln.stringifyNumber},Ad={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():ln.stringifyNumber(t)}},Ed={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){let e=new Sd.Scalar(parseFloat(t)),s=t.indexOf(".");return s!==-1&&t[t.length-1]==="0"&&(e.minFractionDigits=t.length-s-1),e},stringify:ln.stringifyNumber};Cs.float=Ed;Cs.floatExp=Ad;Cs.floatNaN=Nd});var fn=w(xs=>{"use strict";var ma=je(),ks=t=>typeof t=="bigint"||Number.isInteger(t),un=(t,e,s,{intAsBigInt:i})=>i?BigInt(t):parseInt(t.substring(e),s);function ga(t,e,s){let{value:i}=t;return ks(i)&&i>=0?s+i.toString(e):ma.stringifyNumber(t)}var vd={identify:t=>ks(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,e,s)=>un(t,2,8,s),stringify:t=>ga(t,8,"0o")},Td={identify:ks,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,e,s)=>un(t,0,10,s),stringify:ma.stringifyNumber},Cd={identify:t=>ks(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,e,s)=>un(t,2,16,s),stringify:t=>ga(t,16,"0x")};xs.int=Td;xs.intHex=Cd;xs.intOct=vd});var ba=w(ya=>{"use strict";var kd=Fe(),xd=Ts(),Od=Re(),Ld=bt(),Id=an(),dn=cn(),hn=fn(),qd=[kd.map,Od.seq,Ld.string,xd.nullTag,Id.boolTag,hn.intOct,hn.int,hn.intHex,dn.floatNaN,dn.floatExp,dn.float];ya.schema=qd});var Na=w(Sa=>{"use strict";var _d=I(),Pd=Fe(),Md=Re();function wa(t){return typeof t=="bigint"||Number.isInteger(t)}var Os=({value:t})=>JSON.stringify(t),$d=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:Os},{identify:t=>t==null,createNode:()=>new _d.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Os},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:Os},{identify:wa,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,e,{intAsBigInt:s})=>s?BigInt(t):parseInt(t,10),stringify:({value:t})=>wa(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:Os}],Fd={default:!0,tag:"",test:/^/,resolve(t,e){return e(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Rd=[Pd.map,Md.seq].concat($d,Fd);Sa.schema=Rd});var mn=w(Aa=>{"use strict";var wt=$t("buffer"),pn=I(),jd=pt(),Bd={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,e){if(typeof wt.Buffer=="function")return wt.Buffer.from(t,"base64");if(typeof atob=="function"){let s=atob(t.replace(/[\n\r]/g,"")),i=new Uint8Array(s.length);for(let n=0;n<s.length;++n)i[n]=s.charCodeAt(n);return i}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:e,value:s},i,n,r){if(!s)return"";let o=s,a;if(typeof wt.Buffer=="function")a=o instanceof wt.Buffer?o.toString("base64"):wt.Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<o.length;++c)l+=String.fromCharCode(o[c]);a=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=pn.Scalar.BLOCK_LITERAL),e!==pn.Scalar.QUOTE_DOUBLE){let l=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),c=Math.ceil(a.length/l),u=new Array(c);for(let f=0,d=0;f<c;++f,d+=l)u[f]=a.substr(d,l);a=u.join(e===pn.Scalar.BLOCK_LITERAL?`
|
|
55
|
+
`:" ")}return jd.stringifyString({comment:t,type:e,value:a},i,n,r)}};Aa.binary=Bd});var qs=w(Is=>{"use strict";var Ls=k(),gn=le(),Dd=I(),Vd=fe();function Ea(t,e){if(Ls.isSeq(t))for(let s=0;s<t.items.length;++s){let i=t.items[s];if(!Ls.isPair(i)){if(Ls.isMap(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");let n=i.items[0]||new gn.Pair(new Dd.Scalar(null));if(i.commentBefore&&(n.key.commentBefore=n.key.commentBefore?`${i.commentBefore}
|
|
56
|
+
${n.key.commentBefore}`:i.commentBefore),i.comment){let r=n.value??n.key;r.comment=r.comment?`${i.comment}
|
|
57
|
+
${r.comment}`:i.comment}i=n}t.items[s]=Ls.isPair(i)?i:new gn.Pair(i)}}else e("Expected a sequence for this tag");return t}function va(t,e,s){let{replacer:i}=s,n=new Vd.YAMLSeq(t);n.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof i=="function"&&(o=i.call(e,String(r++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){let c=Object.keys(o);if(c.length===1)a=c[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else a=o;n.items.push(gn.createPair(a,l,s))}return n}var Ud={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ea,createNode:va};Is.createPairs=va;Is.pairs=Ud;Is.resolvePairs=Ea});var wn=w(bn=>{"use strict";var Ta=k(),yn=ne(),St=ue(),Kd=fe(),Ca=qs(),we=class t extends Kd.YAMLSeq{constructor(){super(),this.add=St.YAMLMap.prototype.add.bind(this),this.delete=St.YAMLMap.prototype.delete.bind(this),this.get=St.YAMLMap.prototype.get.bind(this),this.has=St.YAMLMap.prototype.has.bind(this),this.set=St.YAMLMap.prototype.set.bind(this),this.tag=t.tag}toJSON(e,s){if(!s)return super.toJSON(e);let i=new Map;s?.onCreate&&s.onCreate(i);for(let n of this.items){let r,o;if(Ta.isPair(n)?(r=yn.toJS(n.key,"",s),o=yn.toJS(n.value,r,s)):r=yn.toJS(n,"",s),i.has(r))throw new Error("Ordered maps must not include duplicate keys");i.set(r,o)}return i}static from(e,s,i){let n=Ca.createPairs(e,s,i),r=new this;return r.items=n.items,r}};we.tag="tag:yaml.org,2002:omap";var Yd={collection:"seq",identify:t=>t instanceof Map,nodeClass:we,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){let s=Ca.resolvePairs(t,e),i=[];for(let{key:n}of s.items)Ta.isScalar(n)&&(i.includes(n.value)?e(`Ordered maps must not include duplicate keys: ${n.value}`):i.push(n.value));return Object.assign(new we,s)},createNode:(t,e,s)=>we.from(t,e,s)};bn.YAMLOMap=we;bn.omap=Yd});var Ia=w(Sn=>{"use strict";var ka=I();function xa({value:t,source:e},s){return e&&(t?Oa:La).test.test(e)?e:t?s.options.trueStr:s.options.falseStr}var Oa={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ka.Scalar(!0),stringify:xa},La={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ka.Scalar(!1),stringify:xa};Sn.falseTag=La;Sn.trueTag=Oa});var qa=w(_s=>{"use strict";var Hd=I(),Nn=je(),Gd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Nn.stringifyNumber},Jd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){let e=Number(t.value);return isFinite(e)?e.toExponential():Nn.stringifyNumber(t)}},Wd={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){let e=new Hd.Scalar(parseFloat(t.replace(/_/g,""))),s=t.indexOf(".");if(s!==-1){let i=t.substring(s+1).replace(/_/g,"");i[i.length-1]==="0"&&(e.minFractionDigits=i.length)}return e},stringify:Nn.stringifyNumber};_s.float=Wd;_s.floatExp=Jd;_s.floatNaN=Gd});var Pa=w(At=>{"use strict";var _a=je(),Nt=t=>typeof t=="bigint"||Number.isInteger(t);function Ps(t,e,s,{intAsBigInt:i}){let n=t[0];if((n==="-"||n==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),i){switch(s){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}let o=BigInt(t);return n==="-"?BigInt(-1)*o:o}let r=parseInt(t,s);return n==="-"?-1*r:r}function An(t,e,s){let{value:i}=t;if(Nt(i)){let n=i.toString(e);return i<0?"-"+s+n.substr(1):s+n}return _a.stringifyNumber(t)}var zd={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,s)=>Ps(t,2,2,s),stringify:t=>An(t,2,"0b")},Xd={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,s)=>Ps(t,1,8,s),stringify:t=>An(t,8,"0")},Qd={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,s)=>Ps(t,0,10,s),stringify:_a.stringifyNumber},Zd={identify:Nt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,s)=>Ps(t,2,16,s),stringify:t=>An(t,16,"0x")};At.int=Qd;At.intBin=zd;At.intHex=Zd;At.intOct=Xd});var vn=w(En=>{"use strict";var Fs=k(),Ms=le(),$s=ue(),Se=class t extends $s.YAMLMap{constructor(e){super(e),this.tag=t.tag}add(e){let s;Fs.isPair(e)?s=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?s=new Ms.Pair(e.key,null):s=new Ms.Pair(e,null),$s.findPair(this.items,s.key)||this.items.push(s)}get(e,s){let i=$s.findPair(this.items,e);return!s&&Fs.isPair(i)?Fs.isScalar(i.key)?i.key.value:i.key:i}set(e,s){if(typeof s!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof s}`);let i=$s.findPair(this.items,e);i&&!s?this.items.splice(this.items.indexOf(i),1):!i&&s&&this.items.push(new Ms.Pair(e))}toJSON(e,s){return super.toJSON(e,s,Set)}toString(e,s,i){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),s,i);throw new Error("Set items must all have null values")}static from(e,s,i){let{replacer:n}=i,r=new this(e);if(s&&Symbol.iterator in Object(s))for(let o of s)typeof n=="function"&&(o=n.call(s,o,o)),r.items.push(Ms.createPair(o,null,i));return r}};Se.tag="tag:yaml.org,2002:set";var eh={collection:"map",identify:t=>t instanceof Set,nodeClass:Se,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,e,s)=>Se.from(t,e,s),resolve(t,e){if(Fs.isMap(t)){if(t.hasAllNullValues(!0))return Object.assign(new Se,t);e("Set items must all have null values")}else e("Expected a mapping for this tag");return t}};En.YAMLSet=Se;En.set=eh});var Cn=w(Rs=>{"use strict";var th=je();function Tn(t,e){let s=t[0],i=s==="-"||s==="+"?t.substring(1):t,n=o=>e?BigInt(o):Number(o),r=i.replace(/_/g,"").split(":").reduce((o,a)=>o*n(60)+n(a),n(0));return s==="-"?n(-1)*r:r}function Ma(t){let{value:e}=t,s=o=>o;if(typeof e=="bigint")s=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return th.stringifyNumber(t);let i="";e<0&&(i="-",e*=s(-1));let n=s(60),r=[e%n];return e<60?r.unshift(0):(e=(e-r[0])/n,r.unshift(e%n),e>=60&&(e=(e-r[0])/n,r.unshift(e))),i+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var sh={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,e,{intAsBigInt:s})=>Tn(t,s),stringify:Ma},ih={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Tn(t,!1),stringify:Ma},$a={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){let e=t.match($a.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,s,i,n,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(s,i-1,n,r||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Tn(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Rs.floatTime=ih;Rs.intTime=sh;Rs.timestamp=$a});var ja=w(Ra=>{"use strict";var nh=Fe(),rh=Ts(),oh=Re(),ah=bt(),lh=mn(),Fa=Ia(),kn=qa(),js=Pa(),ch=ys(),uh=wn(),fh=qs(),dh=vn(),xn=Cn(),hh=[nh.map,oh.seq,ah.string,rh.nullTag,Fa.trueTag,Fa.falseTag,js.intBin,js.intOct,js.int,js.intHex,kn.floatNaN,kn.floatExp,kn.float,lh.binary,ch.merge,uh.omap,fh.pairs,dh.set,xn.intTime,xn.floatTime,xn.timestamp];Ra.schema=hh});var Wa=w(In=>{"use strict";var Ua=Fe(),ph=Ts(),Ka=Re(),mh=bt(),gh=an(),On=cn(),Ln=fn(),yh=ba(),bh=Na(),Ya=mn(),Et=ys(),Ha=wn(),Ga=qs(),Ba=ja(),Ja=vn(),Bs=Cn(),Da=new Map([["core",yh.schema],["failsafe",[Ua.map,Ka.seq,mh.string]],["json",bh.schema],["yaml11",Ba.schema],["yaml-1.1",Ba.schema]]),Va={binary:Ya.binary,bool:gh.boolTag,float:On.float,floatExp:On.floatExp,floatNaN:On.floatNaN,floatTime:Bs.floatTime,int:Ln.int,intHex:Ln.intHex,intOct:Ln.intOct,intTime:Bs.intTime,map:Ua.map,merge:Et.merge,null:ph.nullTag,omap:Ha.omap,pairs:Ga.pairs,seq:Ka.seq,set:Ja.set,timestamp:Bs.timestamp},wh={"tag:yaml.org,2002:binary":Ya.binary,"tag:yaml.org,2002:merge":Et.merge,"tag:yaml.org,2002:omap":Ha.omap,"tag:yaml.org,2002:pairs":Ga.pairs,"tag:yaml.org,2002:set":Ja.set,"tag:yaml.org,2002:timestamp":Bs.timestamp};function Sh(t,e,s){let i=Da.get(e);if(i&&!t)return s&&!i.includes(Et.merge)?i.concat(Et.merge):i.slice();let n=i;if(!n)if(Array.isArray(t))n=[];else{let r=Array.from(Da.keys()).filter(o=>o!=="yaml11").map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`)}if(Array.isArray(t))for(let r of t)n=n.concat(r);else typeof t=="function"&&(n=t(n.slice()));return s&&(n=n.concat(Et.merge)),n.reduce((r,o)=>{let a=typeof o=="string"?Va[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(Va).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return r.includes(a)||r.push(a),r},[])}In.coreKnownTags=wh;In.getTags=Sh});var Pn=w(za=>{"use strict";var qn=k(),Nh=Fe(),Ah=Re(),Eh=bt(),Ds=Wa(),vh=(t,e)=>t.key<e.key?-1:t.key>e.key?1:0,_n=class t{constructor({compat:e,customTags:s,merge:i,resolveKnownTags:n,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?Ds.getTags(e,"compat"):e?Ds.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=n?Ds.coreKnownTags:{},this.tags=Ds.getTags(s,this.name,i),this.toStringOptions=a??null,Object.defineProperty(this,qn.MAP,{value:Nh.map}),Object.defineProperty(this,qn.SCALAR,{value:Eh.string}),Object.defineProperty(this,qn.SEQ,{value:Ah.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?vh:null}clone(){let e=Object.create(t.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};za.Schema=_n});var Qa=w(Xa=>{"use strict";var Th=k(),Mn=mt(),vt=ft();function Ch(t,e){let s=[],i=e.directives===!0;if(e.directives!==!1&&t.directives){let l=t.directives.toString(t);l?(s.push(l),i=!0):t.directives.docStart&&(i=!0)}i&&s.push("---");let n=Mn.createStringifyContext(t,e),{commentString:r}=n.options;if(t.commentBefore){s.length!==1&&s.unshift("");let l=r(t.commentBefore);s.unshift(vt.indentComment(l,""))}let o=!1,a=null;if(t.contents){if(Th.isNode(t.contents)){if(t.contents.spaceBefore&&i&&s.push(""),t.contents.commentBefore){let u=r(t.contents.commentBefore);s.push(vt.indentComment(u,""))}n.forceBlockIndent=!!t.comment,a=t.contents.comment}let l=a?void 0:()=>o=!0,c=Mn.stringify(t.contents,n,()=>a=null,l);a&&(c+=vt.lineComment(c,"",r(a))),(c[0]==="|"||c[0]===">")&&s[s.length-1]==="---"?s[s.length-1]=`--- ${c}`:s.push(c)}else s.push(Mn.stringify(t.contents,n));if(t.directives?.docEnd)if(t.comment){let l=r(t.comment);l.includes(`
|
|
58
|
+
`)?(s.push("..."),s.push(vt.indentComment(l,""))):s.push(`... ${l}`)}else s.push("...");else{let l=t.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&s[s.length-1]!==""&&s.push(""),s.push(vt.indentComment(r(l),"")))}return s.join(`
|
|
59
|
+
`)+`
|
|
60
|
+
`}Xa.stringifyDocument=Ch});var Tt=w(Za=>{"use strict";var kh=ct(),Be=as(),H=k(),xh=le(),Oh=ne(),Lh=Pn(),Ih=Qa(),$n=is(),qh=ji(),_h=ut(),Fn=Ri(),Rn=class t{constructor(e,s,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,H.NODE_TYPE,{value:H.DOC});let n=null;typeof s=="function"||Array.isArray(s)?n=s:i===void 0&&s&&(i=s,s=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=r;let{version:o}=r;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Fn.Directives({version:o}),this.setSchema(o,i),this.contents=e===void 0?null:this.createNode(e,n,i)}clone(){let e=Object.create(t.prototype,{[H.NODE_TYPE]:{value:H.DOC}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=H.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){De(this.contents)&&this.contents.add(e)}addIn(e,s){De(this.contents)&&this.contents.addIn(e,s)}createAlias(e,s){if(!e.anchor){let i=$n.anchorNames(this);e.anchor=!s||i.has(s)?$n.findNewAnchor(s||"a",i):s}return new kh.Alias(e.anchor)}createNode(e,s,i){let n;if(typeof s=="function")e=s.call({"":e},"",e),n=s;else if(Array.isArray(s)){let m=y=>typeof y=="number"||y instanceof String||y instanceof Number,b=s.filter(m).map(String);b.length>0&&(s=s.concat(b)),n=s}else i===void 0&&s&&(i=s,s=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=i??{},{onAnchor:f,setAnchors:d,sourceObjects:h}=$n.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:h},p=_h.createNode(e,u,g);return a&&H.isCollection(p)&&(p.flow=!0),d(),p}createPair(e,s,i={}){let n=this.createNode(e,null,i),r=this.createNode(s,null,i);return new xh.Pair(n,r)}delete(e){return De(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Be.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):De(this.contents)?this.contents.deleteIn(e):!1}get(e,s){return H.isCollection(this.contents)?this.contents.get(e,s):void 0}getIn(e,s){return Be.isEmptyPath(e)?!s&&H.isScalar(this.contents)?this.contents.value:this.contents:H.isCollection(this.contents)?this.contents.getIn(e,s):void 0}has(e){return H.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return Be.isEmptyPath(e)?this.contents!==void 0:H.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,s){this.contents==null?this.contents=Be.collectionFromPath(this.schema,[e],s):De(this.contents)&&this.contents.set(e,s)}setIn(e,s){Be.isEmptyPath(e)?this.contents=s:this.contents==null?this.contents=Be.collectionFromPath(this.schema,Array.from(e),s):De(this.contents)&&this.contents.setIn(e,s)}setSchema(e,s={}){typeof e=="number"&&(e=String(e));let i;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Fn.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Fn.Directives({version:e}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(s.schema instanceof Object)this.schema=s.schema;else if(i)this.schema=new Lh.Schema(Object.assign(i,s));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:s,mapAsMap:i,maxAliasCount:n,onAnchor:r,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=Oh.toJS(this.contents,s??"",a);if(typeof r=="function")for(let{count:c,res:u}of a.anchors.values())r(u,c);return typeof o=="function"?qh.applyReviver(o,{"":l},"",l):l}toJSON(e,s){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:s})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){let s=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${s}`)}return Ih.stringifyDocument(this,e)}};function De(t){if(H.isCollection(t))return!0;throw new Error("Expected a YAML collection as document contents")}Za.Document=Rn});var xt=w(kt=>{"use strict";var Ct=class extends Error{constructor(e,s,i,n){super(),this.name=e,this.code=i,this.message=n,this.pos=s}},jn=class extends Ct{constructor(e,s,i){super("YAMLParseError",e,s,i)}},Bn=class extends Ct{constructor(e,s,i){super("YAMLWarning",e,s,i)}},Ph=(t,e)=>s=>{if(s.pos[0]===-1)return;s.linePos=s.pos.map(a=>e.linePos(a));let{line:i,col:n}=s.linePos[0];s.message+=` at line ${i}, column ${n}`;let r=n-1,o=t.substring(e.lineStarts[i-1],e.lineStarts[i]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){let a=Math.min(r-39,o.length-79);o="\u2026"+o.substring(a),r-=a-1}if(o.length>80&&(o=o.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(o.substring(0,r))){let a=t.substring(e.lineStarts[i-2],e.lineStarts[i-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
61
|
+
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=s.linePos[1];l?.line===i&&l.col>n&&(a=Math.max(1,Math.min(l.col-n,80-r)));let c=" ".repeat(r)+"^".repeat(a);s.message+=`:
|
|
62
|
+
|
|
63
|
+
${o}
|
|
64
|
+
${c}
|
|
65
|
+
`}};kt.YAMLError=Ct;kt.YAMLParseError=jn;kt.YAMLWarning=Bn;kt.prettifyError=Ph});var Ot=w(el=>{"use strict";function Mh(t,{flow:e,indicator:s,next:i,offset:n,onError:r,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",h=!1,g=!1,p=null,m=null,b=null,y=null,A=null,S=null,v=null;for(let N of t)switch(g&&(N.type!=="space"&&N.type!=="newline"&&N.type!=="comma"&&r(N.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),p&&(c&&N.type!=="comment"&&N.type!=="newline"&&r(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),p=null),N.type){case"space":!e&&(s!=="doc-start"||i?.type!=="flow-collection")&&N.source.includes(" ")&&(p=N),u=!0;break;case"comment":{u||r(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let O=N.source.substring(1)||" ";f?f+=d+O:f=O,d="",c=!1;break}case"newline":c?f?f+=N.source:(!S||s!=="seq-item-ind")&&(l=!0):d+=N.source,c=!0,h=!0,(m||b)&&(y=N),u=!0;break;case"anchor":m&&r(N,"MULTIPLE_ANCHORS","A node can have at most one anchor"),N.source.endsWith(":")&&r(N.offset+N.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),m=N,v??(v=N.offset),c=!1,u=!1,g=!0;break;case"tag":{b&&r(N,"MULTIPLE_TAGS","A node can have at most one tag"),b=N,v??(v=N.offset),c=!1,u=!1,g=!0;break}case s:(m||b)&&r(N,"BAD_PROP_ORDER",`Anchors and tags must be after the ${N.source} indicator`),S&&r(N,"UNEXPECTED_TOKEN",`Unexpected ${N.source} in ${e??"collection"}`),S=N,c=s==="seq-item-ind"||s==="explicit-key-ind",u=!1;break;case"comma":if(e){A&&r(N,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),A=N,c=!1,u=!1;break}default:r(N,"UNEXPECTED_TOKEN",`Unexpected ${N.type} token`),c=!1,u=!1}let E=t[t.length-1],C=E?E.offset+E.source.length:n;return g&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&r(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),p&&(c&&p.indent<=o||i?.type==="block-map"||i?.type==="block-seq")&&r(p,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:S,spaceBefore:l,comment:f,hasNewline:h,anchor:m,tag:b,newlineAfterProp:y,end:C,start:v??C}}el.resolveProps=Mh});var Vs=w(tl=>{"use strict";function Dn(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
66
|
+
`))return!0;if(t.end){for(let e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of t.items){for(let s of e.start)if(s.type==="newline")return!0;if(e.sep){for(let s of e.sep)if(s.type==="newline")return!0}if(Dn(e.key)||Dn(e.value))return!0}return!1;default:return!0}}tl.containsNewline=Dn});var Vn=w(sl=>{"use strict";var $h=Vs();function Fh(t,e,s){if(e?.type==="flow-collection"){let i=e.end[0];i.indent===t&&(i.source==="]"||i.source==="}")&&$h.containsNewline(e)&&s(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}sl.flowIndentCheck=Fh});var Un=w(nl=>{"use strict";var il=k();function Rh(t,e,s){let{uniqueKeys:i}=t.options;if(i===!1)return!1;let n=typeof i=="function"?i:(r,o)=>r===o||il.isScalar(r)&&il.isScalar(o)&&r.value===o.value;return e.some(r=>n(r.key,s))}nl.mapIncludes=Rh});var ul=w(cl=>{"use strict";var rl=le(),jh=ue(),ol=Ot(),Bh=Vs(),al=Vn(),Dh=Un(),ll="All mapping items must start at the same column";function Vh({composeNode:t,composeEmptyNode:e},s,i,n,r){let o=r?.nodeClass??jh.YAMLMap,a=new o(s.schema);s.atRoot&&(s.atRoot=!1);let l=i.offset,c=null;for(let u of i.items){let{start:f,key:d,sep:h,value:g}=u,p=ol.resolveProps(f,{indicator:"explicit-key-ind",next:d??h?.[0],offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0}),m=!p.found;if(m){if(d&&(d.type==="block-seq"?n(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==i.indent&&n(l,"BAD_INDENT",ll)),!p.anchor&&!p.tag&&!h){c=p.end,p.comment&&(a.comment?a.comment+=`
|
|
67
|
+
`+p.comment:a.comment=p.comment);continue}(p.newlineAfterProp||Bh.containsNewline(d))&&n(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==i.indent&&n(l,"BAD_INDENT",ll);s.atKey=!0;let b=p.end,y=d?t(s,d,p,n):e(s,b,f,null,p,n);s.schema.compat&&al.flowIndentCheck(i.indent,d,n),s.atKey=!1,Dh.mapIncludes(s,a.items,y)&&n(b,"DUPLICATE_KEY","Map keys must be unique");let A=ol.resolveProps(h??[],{indicator:"map-value-ind",next:g,offset:y.range[2],onError:n,parentIndent:i.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=A.end,A.found){m&&(g?.type==="block-map"&&!A.hasNewline&&n(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),s.options.strict&&p.start<A.found.offset-1024&&n(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let S=g?t(s,g,A,n):e(s,l,h,null,A,n);s.schema.compat&&al.flowIndentCheck(i.indent,g,n),l=S.range[2];let v=new rl.Pair(y,S);s.options.keepSourceTokens&&(v.srcToken=u),a.items.push(v)}else{m&&n(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),A.comment&&(y.comment?y.comment+=`
|
|
68
|
+
`+A.comment:y.comment=A.comment);let S=new rl.Pair(y);s.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return c&&c<l&&n(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[i.offset,l,c??l],a}cl.resolveBlockMap=Vh});var dl=w(fl=>{"use strict";var Uh=fe(),Kh=Ot(),Yh=Vn();function Hh({composeNode:t,composeEmptyNode:e},s,i,n,r){let o=r?.nodeClass??Uh.YAMLSeq,a=new o(s.schema);s.atRoot&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let l=i.offset,c=null;for(let{start:u,value:f}of i.items){let d=Kh.resolveProps(u,{indicator:"seq-item-ind",next:f,offset:l,onError:n,parentIndent:i.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?n(d.end,"BAD_INDENT","All sequence items must start at the same column"):n(l,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}let h=f?t(s,f,d,n):e(s,d.end,u,null,d,n);s.schema.compat&&Yh.flowIndentCheck(i.indent,f,n),l=h.range[2],a.items.push(h)}return a.range=[i.offset,l,c??l],a}fl.resolveBlockSeq=Hh});var Ve=w(hl=>{"use strict";function Gh(t,e,s,i){let n="";if(t){let r=!1,o="";for(let a of t){let{source:l,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{s&&!r&&i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";n?n+=o+u:n=u,o="";break}case"newline":n&&(o+=l),r=!0;break;default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:n,offset:e}}hl.resolveEnd=Gh});var yl=w(gl=>{"use strict";var Jh=k(),Wh=le(),pl=ue(),zh=fe(),Xh=Ve(),ml=Ot(),Qh=Vs(),Zh=Un(),Kn="Block collections are not allowed within flow collections",Yn=t=>t&&(t.type==="block-map"||t.type==="block-seq");function ep({composeNode:t,composeEmptyNode:e},s,i,n,r){let o=i.start.source==="{",a=o?"flow map":"flow sequence",l=r?.nodeClass??(o?pl.YAMLMap:zh.YAMLSeq),c=new l(s.schema);c.flow=!0;let u=s.atRoot;u&&(s.atRoot=!1),s.atKey&&(s.atKey=!1);let f=i.offset+i.start.source.length;for(let m=0;m<i.items.length;++m){let b=i.items[m],{start:y,key:A,sep:S,value:v}=b,E=ml.resolveProps(y,{flow:a,indicator:"explicit-key-ind",next:A??S?.[0],offset:f,onError:n,parentIndent:i.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!v){m===0&&E.comma?n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<i.items.length-1&&n(E.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${a}`),E.comment&&(c.comment?c.comment+=`
|
|
69
|
+
`+E.comment:c.comment=E.comment),f=E.end;continue}!o&&s.options.strict&&Qh.containsNewline(A)&&n(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)E.comma&&n(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||n(E.start,"MISSING_CHAR",`Missing , between ${a} items`),E.comment){let C="";e:for(let N of y)switch(N.type){case"comma":case"space":break;case"comment":C=N.source.substring(1);break e;default:break e}if(C){let N=c.items[c.items.length-1];Jh.isPair(N)&&(N=N.value??N.key),N.comment?N.comment+=`
|
|
70
|
+
`+C:N.comment=C,E.comment=E.comment.substring(C.length+1)}}if(!o&&!S&&!E.found){let C=v?t(s,v,E,n):e(s,E.end,S,null,E,n);c.items.push(C),f=C.range[2],Yn(v)&&n(C.range,"BLOCK_IN_FLOW",Kn)}else{s.atKey=!0;let C=E.end,N=A?t(s,A,E,n):e(s,C,y,null,E,n);Yn(A)&&n(N.range,"BLOCK_IN_FLOW",Kn),s.atKey=!1;let O=ml.resolveProps(S??[],{flow:a,indicator:"map-value-ind",next:v,offset:N.range[2],onError:n,parentIndent:i.indent,startOnNewline:!1});if(O.found){if(!o&&!E.found&&s.options.strict){if(S)for(let q of S){if(q===O.found)break;if(q.type==="newline"){n(q,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<O.found.offset-1024&&n(O.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else v&&("source"in v&&v.source?.[0]===":"?n(v,"MISSING_CHAR",`Missing space after : in ${a}`):n(O.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let Y=v?t(s,v,O,n):O.found?e(s,O.end,S,null,O,n):null;Y?Yn(v)&&n(Y.range,"BLOCK_IN_FLOW",Kn):O.comment&&(N.comment?N.comment+=`
|
|
71
|
+
`+O.comment:N.comment=O.comment);let Ee=new Wh.Pair(N,Y);if(s.options.keepSourceTokens&&(Ee.srcToken=b),o){let q=c;Zh.mapIncludes(s,q.items,N)&&n(C,"DUPLICATE_KEY","Map keys must be unique"),q.items.push(Ee)}else{let q=new pl.YAMLMap(s.schema);q.flow=!0,q.items.push(Ee);let Sr=(Y??N).range;q.range=[N.range[0],Sr[1],Sr[2]],c.items.push(q)}f=Y?Y.range[2]:O.end}}let d=o?"}":"]",[h,...g]=i.end,p=f;if(h?.source===d)p=h.offset+h.source.length;else{let m=a[0].toUpperCase()+a.substring(1),b=u?`${m} must end with a ${d}`:`${m} in block collection must be sufficiently indented and end with a ${d}`;n(f,u?"MISSING_CHAR":"BAD_INDENT",b),h&&h.source.length!==1&&g.unshift(h)}if(g.length>0){let m=Xh.resolveEnd(g,p,s.options.strict,n);m.comment&&(c.comment?c.comment+=`
|
|
72
|
+
`+m.comment:c.comment=m.comment),c.range=[i.offset,p,m.offset]}else c.range=[i.offset,p,p];return c}gl.resolveFlowCollection=ep});var wl=w(bl=>{"use strict";var tp=k(),sp=I(),ip=ue(),np=fe(),rp=ul(),op=dl(),ap=yl();function Hn(t,e,s,i,n,r){let o=s.type==="block-map"?rp.resolveBlockMap(t,e,s,i,r):s.type==="block-seq"?op.resolveBlockSeq(t,e,s,i,r):ap.resolveFlowCollection(t,e,s,i,r),a=o.constructor;return n==="!"||n===a.tagName?(o.tag=a.tagName,o):(n&&(o.tag=n),o)}function lp(t,e,s,i,n){let r=i.tag,o=r?e.directives.tagName(r.source,d=>n(r,"TAG_RESOLVE_FAILED",d)):null;if(s.type==="block-seq"){let{anchor:d,newlineAfterProp:h}=i,g=d&&r?d.offset>r.offset?d:r:d??r;g&&(!h||h.offset<g.offset)&&n(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=s.type==="block-map"?"map":s.type==="block-seq"?"seq":s.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===ip.YAMLMap.tagName&&a==="map"||o===np.YAMLSeq.tagName&&a==="seq")return Hn(t,e,s,n,o);let l=e.schema.tags.find(d=>d.tag===o&&d.collection===a);if(!l){let d=e.schema.knownTags[o];if(d?.collection===a)e.schema.tags.push(Object.assign({},d,{default:!1})),l=d;else return d?n(r,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):n(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Hn(t,e,s,n,o)}let c=Hn(t,e,s,n,o,l),u=l.resolve?.(c,d=>n(r,"TAG_RESOLVE_FAILED",d),e.options)??c,f=tp.isNode(u)?u:new sp.Scalar(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}bl.composeCollection=lp});var Jn=w(Sl=>{"use strict";var Gn=I();function cp(t,e,s){let i=e.offset,n=up(e,t.options.strict,s);if(!n)return{value:"",type:null,comment:"",range:[i,i,i]};let r=n.mode===">"?Gn.Scalar.BLOCK_FOLDED:Gn.Scalar.BLOCK_LITERAL,o=e.source?fp(e.source):[],a=o.length;for(let p=o.length-1;p>=0;--p){let m=o[p][1];if(m===""||m==="\r")a=p;else break}if(a===0){let p=n.chomp==="+"&&o.length>0?`
|
|
73
|
+
`.repeat(Math.max(1,o.length-1)):"",m=i+n.length;return e.source&&(m+=e.source.length),{value:p,type:r,comment:n.comment,range:[i,m,m]}}let l=e.indent+n.indent,c=e.offset+n.length,u=0;for(let p=0;p<a;++p){let[m,b]=o[p];if(b===""||b==="\r")n.indent===0&&m.length>l&&(l=m.length);else{m.length<l&&s(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),n.indent===0&&(l=m.length),u=p,l===0&&!t.atRoot&&s(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+b.length+1}for(let p=o.length-1;p>=a;--p)o[p][0].length>l&&(a=p+1);let f="",d="",h=!1;for(let p=0;p<u;++p)f+=o[p][0].slice(l)+`
|
|
74
|
+
`;for(let p=u;p<a;++p){let[m,b]=o[p];c+=m.length+b.length+1;let y=b[b.length-1]==="\r";if(y&&(b=b.slice(0,-1)),b&&m.length<l){let S=`Block scalar lines must not be less indented than their ${n.indent?"explicit indentation indicator":"first line"}`;s(c-b.length-(y?2:1),"BAD_INDENT",S),m=""}r===Gn.Scalar.BLOCK_LITERAL?(f+=d+m.slice(l)+b,d=`
|
|
75
|
+
`):m.length>l||b[0]===" "?(d===" "?d=`
|
|
76
|
+
`:!h&&d===`
|
|
77
|
+
`&&(d=`
|
|
78
|
+
|
|
79
|
+
`),f+=d+m.slice(l)+b,d=`
|
|
80
|
+
`,h=!0):b===""?d===`
|
|
81
|
+
`?f+=`
|
|
82
|
+
`:d=`
|
|
83
|
+
`:(f+=d+b,d=" ",h=!1)}switch(n.chomp){case"-":break;case"+":for(let p=a;p<o.length;++p)f+=`
|
|
84
|
+
`+o[p][0].slice(l);f[f.length-1]!==`
|
|
85
|
+
`&&(f+=`
|
|
86
|
+
`);break;default:f+=`
|
|
87
|
+
`}let g=i+n.length+e.source.length;return{value:f,type:r,comment:n.comment,range:[i,g,g]}}function up({offset:t,props:e},s,i){if(e[0].type!=="block-scalar-header")return i(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:n}=e[0],r=n[0],o=0,a="",l=-1;for(let d=1;d<n.length;++d){let h=n[d];if(!a&&(h==="-"||h==="+"))a=h;else{let g=Number(h);!o&&g?o=g:l===-1&&(l=t+d)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${n}`);let c=!1,u="",f=n.length;for(let d=1;d<e.length;++d){let h=e[d];switch(h.type){case"space":c=!0;case"newline":f+=h.source.length;break;case"comment":s&&!c&&i(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=h.source.length,u=h.source.substring(1);break;case"error":i(h,"UNEXPECTED_TOKEN",h.message),f+=h.source.length;break;default:{let g=`Unexpected token in block scalar header: ${h.type}`;i(h,"UNEXPECTED_TOKEN",g);let p=h.source;p&&typeof p=="string"&&(f+=p.length)}}}return{mode:r,indent:o,chomp:a,comment:u,length:f}}function fp(t){let e=t.split(/\n( *)/),s=e[0],i=s.match(/^( *)/),r=[i?.[1]?[i[1],s.slice(i[1].length)]:["",s]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}Sl.resolveBlockScalar=cp});var zn=w(Al=>{"use strict";var Wn=I(),dp=Ve();function hp(t,e,s){let{offset:i,type:n,source:r,end:o}=t,a,l,c=(d,h,g)=>s(i+d,h,g);switch(n){case"scalar":a=Wn.Scalar.PLAIN,l=pp(r,c);break;case"single-quoted-scalar":a=Wn.Scalar.QUOTE_SINGLE,l=mp(r,c);break;case"double-quoted-scalar":a=Wn.Scalar.QUOTE_DOUBLE,l=gp(r,c);break;default:return s(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${n}`),{value:"",type:null,comment:"",range:[i,i+r.length,i+r.length]}}let u=i+r.length,f=dp.resolveEnd(o,u,e,s);return{value:l,type:a,comment:f.comment,range:[i,u,f.offset]}}function pp(t,e){let s="";switch(t[0]){case" ":s="a tab character";break;case",":s="flow indicator character ,";break;case"%":s="directive indicator character %";break;case"|":case">":{s=`block scalar indicator ${t[0]}`;break}case"@":case"`":{s=`reserved character ${t[0]}`;break}}return s&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${s}`),Nl(t)}function mp(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),Nl(t.slice(1,-1)).replace(/''/g,"'")}function Nl(t){let e,s;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
88
|
+
`,"sy"),s=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
89
|
+
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,s=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=e.exec(t);if(!i)return t;let n=i[1],r=" ",o=e.lastIndex;for(s.lastIndex=o;i=s.exec(t);)i[1]===""?r===`
|
|
90
|
+
`?n+=r:r=`
|
|
91
|
+
`:(n+=r+i[1],r=" "),o=s.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,i=a.exec(t),n+r+(i?.[1]??"")}function gp(t,e){let s="";for(let i=1;i<t.length-1;++i){let n=t[i];if(!(n==="\r"&&t[i+1]===`
|
|
92
|
+
`))if(n===`
|
|
93
|
+
`){let{fold:r,offset:o}=yp(t,i);s+=r,i=o}else if(n==="\\"){let r=t[++i],o=bp[r];if(o)s+=o;else if(r===`
|
|
94
|
+
`)for(r=t[i+1];r===" "||r===" ";)r=t[++i+1];else if(r==="\r"&&t[i+1]===`
|
|
95
|
+
`)for(r=t[++i+1];r===" "||r===" ";)r=t[++i+1];else if(r==="x"||r==="u"||r==="U"){let a=r==="x"?2:r==="u"?4:8;s+=wp(t,i+1,a,e),i+=a}else{let a=t.substr(i-1,2);e(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),s+=a}}else if(n===" "||n===" "){let r=i,o=t[i+1];for(;o===" "||o===" ";)o=t[++i+1];o!==`
|
|
96
|
+
`&&!(o==="\r"&&t[i+2]===`
|
|
97
|
+
`)&&(s+=i>r?t.slice(r,i+1):n)}else s+=n}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),s}function yp(t,e){let s="",i=t[e+1];for(;(i===" "||i===" "||i===`
|
|
98
|
+
`||i==="\r")&&!(i==="\r"&&t[e+2]!==`
|
|
99
|
+
`);)i===`
|
|
100
|
+
`&&(s+=`
|
|
101
|
+
`),e+=1,i=t[e+1];return s||(s=" "),{fold:s,offset:e}}var bp={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
102
|
+
`,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function wp(t,e,s,i){let n=t.substr(e,s),o=n.length===s&&/^[0-9a-fA-F]+$/.test(n)?parseInt(n,16):NaN;try{return String.fromCodePoint(o)}catch{let a=t.substr(e-2,s+2);return i(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}Al.resolveFlowScalar=hp});var Tl=w(vl=>{"use strict";var Ne=k(),El=I(),Sp=Jn(),Np=zn();function Ap(t,e,s,i){let{value:n,type:r,comment:o,range:a}=e.type==="block-scalar"?Sp.resolveBlockScalar(t,e,i):Np.resolveFlowScalar(e,t.options.strict,i),l=s?t.directives.tagName(s.source,f=>i(s,"TAG_RESOLVE_FAILED",f)):null,c;t.options.stringKeys&&t.atKey?c=t.schema[Ne.SCALAR]:l?c=Ep(t.schema,n,l,s,i):e.type==="scalar"?c=vp(t,n,e,i):c=t.schema[Ne.SCALAR];let u;try{let f=c.resolve(n,d=>i(s??e,"TAG_RESOLVE_FAILED",d),t.options);u=Ne.isScalar(f)?f:new El.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);i(s??e,"TAG_RESOLVE_FAILED",d),u=new El.Scalar(n)}return u.range=a,u.source=n,r&&(u.type=r),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Ep(t,e,s,i,n){if(s==="!")return t[Ne.SCALAR];let r=[];for(let a of t.tags)if(!a.collection&&a.tag===s)if(a.default&&a.test)r.push(a);else return a;for(let a of r)if(a.test?.test(e))return a;let o=t.knownTags[s];return o&&!o.collection?(t.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,s!=="tag:yaml.org,2002:str"),t[Ne.SCALAR])}function vp({atKey:t,directives:e,schema:s},i,n,r){let o=s.tags.find(a=>(a.default===!0||t&&a.default==="key")&&a.test?.test(i))||s[Ne.SCALAR];if(s.compat){let a=s.compat.find(l=>l.default&&l.test?.test(i))??s[Ne.SCALAR];if(o.tag!==a.tag){let l=e.tagString(o.tag),c=e.tagString(a.tag),u=`Value may be parsed as either ${l} or ${c}`;r(n,"TAG_RESOLVE_FAILED",u,!0)}}return o}vl.composeScalar=Ap});var kl=w(Cl=>{"use strict";function Tp(t,e,s){if(e){s??(s=e.length);for(let i=s-1;i>=0;--i){let n=e[i];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}for(n=e[++i];n?.type==="space";)t+=n.source.length,n=e[++i];break}}return t}Cl.emptyScalarPosition=Tp});var Ll=w(Qn=>{"use strict";var Cp=ct(),kp=k(),xp=wl(),xl=Tl(),Op=Ve(),Lp=kl(),Ip={composeNode:Ol,composeEmptyNode:Xn};function Ol(t,e,s,i){let n=t.atKey,{spaceBefore:r,comment:o,anchor:a,tag:l}=s,c,u=!0;switch(e.type){case"alias":c=qp(t,e,i),(a||l)&&i(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=xl.composeScalar(t,e,l,i),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=xp.composeCollection(Ip,t,e,s,i),a&&(c.anchor=a.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);i(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;i(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Xn(t,e.offset,void 0,null,s,i)),a&&c.anchor===""&&i(a,"BAD_ALIAS","Anchor cannot be an empty string"),n&&t.options.stringKeys&&(!kp.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),r&&(c.spaceBefore=!0),o&&(e.type==="scalar"&&e.source===""?c.comment=o:c.commentBefore=o),t.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Xn(t,e,s,i,{spaceBefore:n,comment:r,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:Lp.emptyScalarPosition(e,s,i),indent:-1,source:""},f=xl.composeScalar(t,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=l),f}function qp({options:t},{offset:e,source:s,end:i},n){let r=new Cp.Alias(s.substring(1));r.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&n(e+s.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+s.length,a=Op.resolveEnd(i,o,t.strict,n);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}Qn.composeEmptyNode=Xn;Qn.composeNode=Ol});var _l=w(ql=>{"use strict";var _p=Tt(),Il=Ll(),Pp=Ve(),Mp=Ot();function $p(t,e,{offset:s,start:i,value:n,end:r},o){let a=Object.assign({_directives:e},t),l=new _p.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=Mp.resolveProps(i,{indicator:"doc-start",next:n??r?.[0],offset:s,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=n?Il.composeNode(c,n,u,o):Il.composeEmptyNode(c,u.end,i,null,u,o);let f=l.contents.range[2],d=Pp.resolveEnd(r,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[s,f,d.offset],l}ql.composeDoc=$p});var er=w($l=>{"use strict";var Fp=$t("process"),Rp=Ri(),jp=Tt(),Lt=xt(),Pl=k(),Bp=_l(),Dp=Ve();function It(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];let{offset:e,source:s}=t;return[e,e+(typeof s=="string"?s.length:1)]}function Ml(t){let e="",s=!1,i=!1;for(let n=0;n<t.length;++n){let r=t[n];switch(r[0]){case"#":e+=(e===""?"":i?`
|
|
103
|
+
|
|
104
|
+
`:`
|
|
105
|
+
`)+(r.substring(1)||" "),s=!0,i=!1;break;case"%":t[n+1]?.[0]!=="#"&&(n+=1),s=!1;break;default:s||(i=!0),s=!1}}return{comment:e,afterEmptyLine:i}}var Zn=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(s,i,n,r)=>{let o=It(s);r?this.warnings.push(new Lt.YAMLWarning(o,i,n)):this.errors.push(new Lt.YAMLParseError(o,i,n))},this.directives=new Rp.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,s){let{comment:i,afterEmptyLine:n}=Ml(this.prelude);if(i){let r=e.contents;if(s)e.comment=e.comment?`${e.comment}
|
|
106
|
+
${i}`:i;else if(n||e.directives.docStart||!r)e.commentBefore=i;else if(Pl.isCollection(r)&&!r.flow&&r.items.length>0){let o=r.items[0];Pl.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${i}
|
|
107
|
+
${a}`:i}else{let o=r.commentBefore;r.commentBefore=o?`${i}
|
|
108
|
+
${o}`:i}}if(s){for(let r=0;r<this.errors.length;++r)e.errors.push(this.errors[r]);for(let r=0;r<this.warnings.length;++r)e.warnings.push(this.warnings[r])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ml(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,s=!1,i=-1){for(let n of e)yield*this.next(n);yield*this.end(s,i)}*next(e){switch(Fp.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(s,i,n)=>{let r=It(e);r[0]+=s,this.onError(r,"BAD_DIRECTIVE",i,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let s=Bp.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!s.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(s,!1),this.doc&&(yield this.doc),this.doc=s,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let s=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,i=new Lt.YAMLParseError(It(e),"UNEXPECTED_TOKEN",s);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Lt.YAMLParseError(It(e),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let s=Dp.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),s.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
|
|
109
|
+
${s.comment}`:s.comment}this.doc.range[2]=s.offset;break}default:this.errors.push(new Lt.YAMLParseError(It(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,s=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let i=Object.assign({_directives:this.directives},this.options),n=new jp.Document(void 0,i);this.atDirectives&&this.onError(s,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,s,s],this.decorate(n,!1),yield n}}};$l.Composer=Zn});var jl=w(Us=>{"use strict";var Vp=Jn(),Up=zn(),Kp=xt(),Fl=pt();function Yp(t,e=!0,s){if(t){let i=(n,r,o)=>{let a=typeof n=="number"?n:Array.isArray(n)?n[0]:n.offset;if(s)s(a,r,o);else throw new Kp.YAMLParseError([a,a+1],r,o)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Up.resolveFlowScalar(t,e,i);case"block-scalar":return Vp.resolveBlockScalar({options:{strict:e}},t,i)}}return null}function Hp(t,e){let{implicitKey:s=!1,indent:i,inFlow:n=!1,offset:r=-1,type:o="PLAIN"}=e,a=Fl.stringifyString({type:o,value:t},{implicitKey:s,indent:i>0?" ".repeat(i):"",inFlow:n,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:i,source:`
|
|
110
|
+
`}];switch(a[0]){case"|":case">":{let c=a.indexOf(`
|
|
111
|
+
`),u=a.substring(0,c),f=a.substring(c+1)+`
|
|
112
|
+
`,d=[{type:"block-scalar-header",offset:r,indent:i,source:u}];return Rl(d,l)||d.push({type:"newline",offset:-1,indent:i,source:`
|
|
113
|
+
`}),{type:"block-scalar",offset:r,indent:i,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:i,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:i,source:a,end:l};default:return{type:"scalar",offset:r,indent:i,source:a,end:l}}}function Gp(t,e,s={}){let{afterKey:i=!1,implicitKey:n=!1,inFlow:r=!1,type:o}=s,a="indent"in t?t.indent:null;if(i&&typeof a=="number"&&(a+=2),!o)switch(t.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=t.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}let l=Fl.stringifyString({type:o,value:e},{implicitKey:n||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":Jp(t,l);break;case'"':tr(t,l,"double-quoted-scalar");break;case"'":tr(t,l,"single-quoted-scalar");break;default:tr(t,l,"scalar")}}function Jp(t,e){let s=e.indexOf(`
|
|
114
|
+
`),i=e.substring(0,s),n=e.substring(s+1)+`
|
|
115
|
+
`;if(t.type==="block-scalar"){let r=t.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=i,t.source=n}else{let{offset:r}=t,o="indent"in t?t.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:i}];Rl(a,"end"in t?t.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
116
|
+
`});for(let l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:"block-scalar",indent:o,props:a,source:n})}}function Rl(t,e){if(e)for(let s of e)switch(s.type){case"space":case"comment":t.push(s);break;case"newline":return t.push(s),!0}return!1}function tr(t,e,s){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=s,t.source=e;break;case"block-scalar":{let i=t.props.slice(1),n=e.length;t.props[0].type==="block-scalar-header"&&(n-=t.props[0].source.length);for(let r of i)r.offset+=n;delete t.props,Object.assign(t,{type:s,source:e,end:i});break}case"block-map":case"block-seq":{let n={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
|
117
|
+
`};delete t.items,Object.assign(t,{type:s,source:e,end:[n]});break}default:{let i="indent"in t?t.indent:-1,n="end"in t&&Array.isArray(t.end)?t.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(t))r!=="type"&&r!=="offset"&&delete t[r];Object.assign(t,{type:s,indent:i,source:e,end:n})}}}Us.createScalarToken=Hp;Us.resolveAsScalar=Yp;Us.setScalarValue=Gp});var Dl=w(Bl=>{"use strict";var Wp=t=>"type"in t?Ys(t):Ks(t);function Ys(t){switch(t.type){case"block-scalar":{let e="";for(let s of t.props)e+=Ys(s);return e+t.source}case"block-map":case"block-seq":{let e="";for(let s of t.items)e+=Ks(s);return e}case"flow-collection":{let e=t.start.source;for(let s of t.items)e+=Ks(s);for(let s of t.end)e+=s.source;return e}case"document":{let e=Ks(t);if(t.end)for(let s of t.end)e+=s.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(let s of t.end)e+=s.source;return e}}}function Ks({start:t,key:e,sep:s,value:i}){let n="";for(let r of t)n+=r.source;if(e&&(n+=Ys(e)),s)for(let r of s)n+=r.source;return i&&(n+=Ys(i)),n}Bl.stringify=Wp});var Yl=w(Kl=>{"use strict";var sr=Symbol("break visit"),zp=Symbol("skip children"),Vl=Symbol("remove item");function Ae(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),Ul(Object.freeze([]),t,e)}Ae.BREAK=sr;Ae.SKIP=zp;Ae.REMOVE=Vl;Ae.itemAtPath=(t,e)=>{let s=t;for(let[i,n]of e){let r=s?.[i];if(r&&"items"in r)s=r.items[n];else return}return s};Ae.parentCollection=(t,e)=>{let s=Ae.itemAtPath(t,e.slice(0,-1)),i=e[e.length-1][0],n=s?.[i];if(n&&"items"in n)return n;throw new Error("Parent collection not found")};function Ul(t,e,s){let i=s(e,t);if(typeof i=="symbol")return i;for(let n of["key","value"]){let r=e[n];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let a=Ul(Object.freeze(t.concat([[n,o]])),r.items[o],s);if(typeof a=="number")o=a-1;else{if(a===sr)return sr;a===Vl&&(r.items.splice(o,1),o-=1)}}typeof i=="function"&&n==="key"&&(i=i(e,t))}}return typeof i=="function"?i(e,t):i}Kl.visit=Ae});var Hs=w(D=>{"use strict";var ir=jl(),Xp=Dl(),Qp=Yl(),nr="\uFEFF",rr="",or="",ar="",Zp=t=>!!t&&"items"in t,em=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function tm(t){switch(t){case nr:return"<BOM>";case rr:return"<DOC>";case or:return"<FLOW_END>";case ar:return"<SCALAR>";default:return JSON.stringify(t)}}function sm(t){switch(t){case nr:return"byte-order-mark";case rr:return"doc-mode";case or:return"flow-error-end";case ar:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
118
|
+
`:case`\r
|
|
119
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}D.createScalarToken=ir.createScalarToken;D.resolveAsScalar=ir.resolveAsScalar;D.setScalarValue=ir.setScalarValue;D.stringify=Xp.stringify;D.visit=Qp.visit;D.BOM=nr;D.DOCUMENT=rr;D.FLOW_END=or;D.SCALAR=ar;D.isCollection=Zp;D.isScalar=em;D.prettyToken=tm;D.tokenType=sm});var ur=w(Gl=>{"use strict";var qt=Hs();function z(t){switch(t){case void 0:case" ":case`
|
|
120
|
+
`:case"\r":case" ":return!0;default:return!1}}var Hl=new Set("0123456789ABCDEFabcdef"),im=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Gs=new Set(",[]{}"),nm=new Set(` ,[]{}
|
|
121
|
+
\r `),lr=t=>!t||nm.has(t),cr=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,s=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!s;let i=this.next??"stream";for(;i&&(s||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let e=this.pos,s=this.buffer[e];for(;s===" "||s===" ";)s=this.buffer[++e];return!s||s==="#"||s===`
|
|
122
|
+
`?!0:s==="\r"?this.buffer[e+1]===`
|
|
123
|
+
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let s=this.buffer[e];if(this.indentNext>0){let i=0;for(;s===" ";)s=this.buffer[++i+e];if(s==="\r"){let n=this.buffer[i+e+1];if(n===`
|
|
124
|
+
`||!n&&!this.atEnd)return e+i+1}return s===`
|
|
125
|
+
`||i>=this.indentNext||!s&&!this.atEnd?e+i:-1}if(s==="-"||s==="."){let i=this.buffer.substr(e,3);if((i==="---"||i==="...")&&z(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
|
|
126
|
+
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===qt.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let s=e.length,i=e.indexOf("#");for(;i!==-1;){let r=e[i-1];if(r===" "||r===" "){s=i-1;break}else i=e.indexOf("#",i+1)}for(;;){let r=e[s-1];if(r===" "||r===" ")s-=1;else break}let n=(yield*this.pushCount(s))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){let s=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-s),yield*this.pushNewline(),"stream"}return yield qt.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let s=this.peek(3);if((s==="---"||s==="...")&&z(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,s==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!z(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,s]=this.peek(2);if(!s&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&z(s)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let s=yield*this.pushIndicators();switch(e[s]){case"#":yield*this.pushCount(e.length-s);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(lr),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return s+=yield*this.parseBlockScalarHeader(),s+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-s),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,s,i=-1;do e=yield*this.pushNewline(),e>0?(s=yield*this.pushSpaces(!1),this.indentValue=i=s):s=0,s+=yield*this.pushSpaces(!0);while(e+s>0);let n=this.getLine();if(n===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&n[0]!=="#"||i===0&&(n.startsWith("---")||n.startsWith("..."))&&z(n[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(n[0]==="]"||n[0]==="}")))return this.flowLevel=0,yield qt.FLOW_END,yield*this.parseLineStart();let r=0;for(;n[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),n[r]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-r),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(lr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||z(o)||o===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let e=this.charAt(0),s=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;s!==-1&&this.buffer[s+1]==="'";)s=this.buffer.indexOf("'",s+2);else for(;s!==-1;){let r=0;for(;this.buffer[s-1-r]==="\\";)r+=1;if(r%2===0)break;s=this.buffer.indexOf('"',s+1)}let i=this.buffer.substring(0,s),n=i.indexOf(`
|
|
127
|
+
`,this.pos);if(n!==-1){for(;n!==-1;){let r=this.continueScalar(n+1);if(r===-1)break;n=i.indexOf(`
|
|
128
|
+
`,r)}n!==-1&&(s=n-(i[n-1]==="\r"?2:1))}if(s===-1){if(!this.atEnd)return this.setNext("quoted-scalar");s=this.buffer.length}return yield*this.pushToIndex(s+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let s=this.buffer[++e];if(s==="+")this.blockScalarKeep=!0;else if(s>"0"&&s<="9")this.blockScalarIndent=Number(s)-1;else if(s!=="-")break}return yield*this.pushUntil(s=>z(s)||s==="#")}*parseBlockScalar(){let e=this.pos-1,s=0,i;e:for(let r=this.pos;i=this.buffer[r];++r)switch(i){case" ":s+=1;break;case`
|
|
129
|
+
`:e=r,s=0;break;case"\r":{let o=this.buffer[r+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===`
|
|
130
|
+
`)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(s>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=s:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let r=this.continueScalar(e+1);if(r===-1)break;e=this.buffer.indexOf(`
|
|
131
|
+
`,r)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let n=e+1;for(i=this.buffer[n];i===" ";)i=this.buffer[++n];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
|
|
132
|
+
`;)i=this.buffer[++n];e=n-1}else if(!this.blockScalarKeep)do{let r=e-1,o=this.buffer[r];o==="\r"&&(o=this.buffer[--r]);let a=r;for(;o===" ";)o=this.buffer[--r];if(o===`
|
|
133
|
+
`&&r>=this.pos&&r+1+s>a)e=r;else break}while(!0);return yield qt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,s=this.pos-1,i=this.pos-1,n;for(;n=this.buffer[++i];)if(n===":"){let r=this.buffer[i+1];if(z(r)||e&&Gs.has(r))break;s=i}else if(z(n)){let r=this.buffer[i+1];if(n==="\r"&&(r===`
|
|
134
|
+
`?(i+=1,n=`
|
|
135
|
+
`,r=this.buffer[i+1]):s=i),r==="#"||e&&Gs.has(r))break;if(n===`
|
|
136
|
+
`){let o=this.continueScalar(i+1);if(o===-1)break;i=Math.max(i,o-2)}}else{if(e&&Gs.has(n))break;s=i}return!n&&!this.atEnd?this.setNext("plain-scalar"):(yield qt.SCALAR,yield*this.pushToIndex(s+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,s){let i=this.buffer.slice(this.pos,e);return i?(yield i,this.pos+=i.length,i.length):(s&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=yield*this.pushTag(),e+=yield*this.pushSpaces(!0);continue e;case"&":e+=yield*this.pushUntil(lr),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let s=this.flowLevel>0,i=this.charAt(1);if(z(i)||s&&Gs.has(i)){s?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=yield*this.pushCount(1),e+=yield*this.pushSpaces(!0);continue e}}}break e}return e}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,s=this.buffer[e];for(;!z(s)&&s!==">";)s=this.buffer[++e];return yield*this.pushToIndex(s===">"?e+1:e,!1)}else{let e=this.pos+1,s=this.buffer[e];for(;s;)if(im.has(s))s=this.buffer[++e];else if(s==="%"&&Hl.has(this.buffer[e+1])&&Hl.has(this.buffer[e+2]))s=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){let e=this.buffer[this.pos];return e===`
|
|
137
|
+
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
|
|
138
|
+
`?yield*this.pushCount(2):0}*pushSpaces(e){let s=this.pos-1,i;do i=this.buffer[++s];while(i===" "||e&&i===" ");let n=s-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=s),n}*pushUntil(e){let s=this.pos,i=this.buffer[s];for(;!e(i);)i=this.buffer[++s];return yield*this.pushToIndex(s,!1)}};Gl.Lexer=cr});var dr=w(Jl=>{"use strict";var fr=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let s=0,i=this.lineStarts.length;for(;s<i;){let r=s+i>>1;this.lineStarts[r]<e?s=r+1:i=r}if(this.lineStarts[s]===e)return{line:s+1,col:1};if(s===0)return{line:0,col:e};let n=this.lineStarts[s-1];return{line:s,col:e-n+1}}}};Jl.LineCounter=fr});var pr=w(Zl=>{"use strict";var rm=$t("process"),Wl=Hs(),om=ur();function de(t,e){for(let s=0;s<t.length;++s)if(t[s].type===e)return!0;return!1}function zl(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Ql(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Js(t){switch(t.type){case"document":return t.start;case"block-map":{let e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function Ue(t){if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++e]?.type==="space";);return t.splice(e,t.length)}function Ws(t,e){if(e.length<1e5)Array.prototype.push.apply(t,e);else for(let s=0;s<e.length;++s)t.push(e[s])}function Xl(t){if(t.start.type==="flow-seq-start")for(let e of t.items)e.sep&&!e.value&&!de(e.start,"explicit-key-ind")&&!de(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Ql(e.value)?e.value.end?Ws(e.value.end,e.sep):e.value.end=e.sep:Ws(e.start,e.sep),delete e.sep)}var hr=class{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new om.Lexer,this.onNewLine=e}*parse(e,s=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(e,s))yield*this.next(i);s||(yield*this.end())}*next(e){if(this.source=e,rm.env.LOG_TOKENS&&console.log("|",Wl.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let s=Wl.tokenType(e);if(s)if(s==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=s,yield*this.step(),s){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{let i=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let e=this.peek(1);if(this.type==="doc-end"&&e?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){let s=e??this.stack.pop();if(!s)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield s;else{let i=this.peek(1);switch(s.type==="block-scalar"?s.indent="indent"in i?i.indent:0:s.type==="flow-collection"&&i.type==="document"&&(s.indent=0),s.type==="flow-collection"&&Xl(s),i.type){case"document":i.value=s;break;case"block-scalar":i.props.push(s);break;case"block-map":{let n=i.items[i.items.length-1];if(n.value){i.items.push({start:[],key:s,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=s;else{Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{let n=i.items[i.items.length-1];n.value?i.items.push({start:[],value:s}):n.value=s;break}case"flow-collection":{let n=i.items[i.items.length-1];!n||n.value?i.items.push({start:[],key:s,sep:[]}):n.sep?n.value=s:Object.assign(n,{key:s,sep:[]});return}default:yield*this.pop(),yield*this.pop(s)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(s.type==="block-map"||s.type==="block-seq")){let n=s.items[s.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&zl(n.start)===-1&&(s.indent===0||n.start.every(r=>r.type!=="comment"||r.indent<s.indent))&&(i.type==="document"?i.end=n.start:i.items.push({start:n.start}),s.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{zl(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}let s=this.startBlockValue(e);s?this.stack.push(s):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){let s=Js(this.peek(2)),i=Ue(s),n;e.end?(n=e.end,n.push(this.sourceToken),delete e.end):n=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=r}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let s=this.source.indexOf(`
|
|
139
|
+
`)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
|
|
140
|
+
`,s)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let s=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,s.value){let i="end"in s.value?s.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)e.items.push({start:[this.sourceToken]});else if(s.sep)s.sep.push(this.sourceToken);else{if(this.atIndentedComment(s.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Ws(n,s.start),n.push(this.sourceToken),e.items.pop();return}}s.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let i=!this.onKeyLine&&this.indent===e.indent,n=i&&(s.sep||s.explicitKey)&&this.type!=="seq-item-ind",r=[];if(n&&s.sep&&!s.value){let o=[];for(let a=0;a<s.sep.length;++a){let l=s.sep[a];switch(l.type){case"newline":o.push(a);break;case"space":break;case"comment":l.indent>e.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=s.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":n||s.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"explicit-key-ind":!s.sep&&!s.explicitKey?(s.start.push(this.sourceToken),s.explicitKey=!0):n||s.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(s.explicitKey)if(s.sep)if(s.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(de(s.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(Ql(s.key)&&!de(s.sep,"newline")){let o=Ue(s.start),a=s.key,l=s.sep;l.push(this.sourceToken),delete s.key,delete s.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else r.length>0?s.sep=s.sep.concat(r,this.sourceToken):s.sep.push(this.sourceToken);else if(de(s.start,"newline"))Object.assign(s,{key:null,sep:[this.sourceToken]});else{let o=Ue(s.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else s.sep?s.value||n?e.items.push({start:r,key:null,sep:[this.sourceToken]}):de(s.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):s.sep.push(this.sourceToken):Object.assign(s,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);n||s.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):s.sep?this.stack.push(o):(Object.assign(s,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!s.explicitKey&&s.sep&&!de(s.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let s=e.items[e.items.length-1];switch(this.type){case"newline":if(s.value){let i="end"in s.value?s.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else s.start.push(this.sourceToken);return;case"space":case"comment":if(s.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(s.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){Ws(n,s.start),n.push(this.sourceToken),e.items.pop();return}}s.start.push(this.sourceToken)}return;case"anchor":case"tag":if(s.value||this.indent<=e.indent)break;s.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;s.value||de(s.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):s.start.push(this.sourceToken);return}if(this.indent>e.indent){let i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let s=e.items[e.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!s||s.sep?e.items.push({start:[this.sourceToken]}):s.start.push(this.sourceToken);return;case"map-value-ind":!s||s.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):s.sep?s.sep.push(this.sourceToken):Object.assign(s,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!s||s.value?e.items.push({start:[this.sourceToken]}):s.sep?s.sep.push(this.sourceToken):s.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let n=this.flowScalar(this.type);!s||s.value?e.items.push({start:[],key:n,sep:[]}):s.sep?this.stack.push(n):Object.assign(s,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let i=this.startBlockValue(e);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===e.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let n=Js(i),r=Ue(n);Xl(e);let o=e.end.splice(1,e.end.length);o.push(this.sourceToken);let a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let s=this.source.indexOf(`
|
|
141
|
+
`)+1;for(;s!==0;)this.onNewLine(this.offset+s),s=this.source.indexOf(`
|
|
142
|
+
`,s)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let s=Js(e),i=Ue(s);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let s=Js(e),i=Ue(s);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,s){return this.type!=="comment"||this.indent<=s?!1:e.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Zl.Parser=hr});var nc=w(Pt=>{"use strict";var ec=er(),am=Tt(),_t=xt(),lm=Xi(),cm=k(),um=dr(),tc=pr();function sc(t){let e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new um.LineCounter||null,prettyErrors:e}}function fm(t,e={}){let{lineCounter:s,prettyErrors:i}=sc(e),n=new tc.Parser(s?.addNewLine),r=new ec.Composer(e),o=Array.from(r.compose(n.parse(t)));if(i&&s)for(let a of o)a.errors.forEach(_t.prettifyError(t,s)),a.warnings.forEach(_t.prettifyError(t,s));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function ic(t,e={}){let{lineCounter:s,prettyErrors:i}=sc(e),n=new tc.Parser(s?.addNewLine),r=new ec.Composer(e),o=null;for(let a of r.compose(n.parse(t),!0,t.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new _t.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&s&&(o.errors.forEach(_t.prettifyError(t,s)),o.warnings.forEach(_t.prettifyError(t,s))),o}function dm(t,e,s){let i;typeof e=="function"?i=e:s===void 0&&e&&typeof e=="object"&&(s=e);let n=ic(t,s);if(!n)return null;if(n.warnings.forEach(r=>lm.warn(n.options.logLevel,r)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:i},s))}function hm(t,e,s){let i=null;if(typeof e=="function"||Array.isArray(e)?i=e:s===void 0&&e&&(s=e),typeof s=="string"&&(s=s.length),typeof s=="number"){let n=Math.round(s);s=n<1?void 0:n>8?{indent:8}:{indent:n}}if(t===void 0){let{keepUndefined:n}=s??e??{};if(!n)return}return cm.isDocument(t)&&!i?t.toString(s):new am.Document(t,i,s).toString(s)}Pt.parse=dm;Pt.parseAllDocuments=fm;Pt.parseDocument=ic;Pt.stringify=hm});var oc=w(x=>{"use strict";var pm=er(),mm=Tt(),gm=Pn(),mr=xt(),ym=ct(),he=k(),bm=le(),wm=I(),Sm=ue(),Nm=fe(),Am=Hs(),Em=ur(),vm=dr(),Tm=pr(),zs=nc(),rc=rt();x.Composer=pm.Composer;x.Document=mm.Document;x.Schema=gm.Schema;x.YAMLError=mr.YAMLError;x.YAMLParseError=mr.YAMLParseError;x.YAMLWarning=mr.YAMLWarning;x.Alias=ym.Alias;x.isAlias=he.isAlias;x.isCollection=he.isCollection;x.isDocument=he.isDocument;x.isMap=he.isMap;x.isNode=he.isNode;x.isPair=he.isPair;x.isScalar=he.isScalar;x.isSeq=he.isSeq;x.Pair=bm.Pair;x.Scalar=wm.Scalar;x.YAMLMap=Sm.YAMLMap;x.YAMLSeq=Nm.YAMLSeq;x.CST=Am;x.Lexer=Em.Lexer;x.LineCounter=vm.LineCounter;x.Parser=Tm.Parser;x.parse=zs.parse;x.parseAllDocuments=zs.parseAllDocuments;x.parseDocument=zs.parseDocument;x.stringify=zs.stringify;x.visit=rc.visit;x.visitAsync=rc.visitAsync});var Or=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",mc=Or+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",gc="["+Or+"]["+mc+"]*",yc=new RegExp("^"+gc+"$");function Rt(t,e){let s=[],i=e.exec(t);for(;i;){let n=[];n.startIndex=e.lastIndex-i[0].length;let r=i.length;for(let o=0;o<r;o++)n.push(i[o]);s.push(n),i=e.exec(t)}return s}var ti=function(t){let e=yc.exec(t);return!(e===null||typeof e>"u")};function Lr(t){return typeof t<"u"}var He=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],jt=["__proto__","constructor","prototype"];var bc={allowBooleanAttributes:!1,unpairedTags:[]};function Mr(t,e){e=Object.assign({},bc,e);let s=[],i=!1,n=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let r=0;r<t.length;r++)if(t[r]==="<"&&t[r+1]==="?"){if(r+=2,r=qr(t,r),r.err)return r}else if(t[r]==="<"){let o=r;if(r++,t[r]==="!"){r=_r(t,r);continue}else{let a=!1;t[r]==="/"&&(a=!0,r++);let l="";for(;r<t.length&&t[r]!==">"&&t[r]!==" "&&t[r]!==" "&&t[r]!==`
|
|
143
|
+
`&&t[r]!=="\r";r++)l+=t[r];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),r--),!Cc(l)){let f;return l.trim().length===0?f="Invalid space after '<'.":f="Tag '"+l+"' is an invalid name.",L("InvalidTag",f,M(t,r))}let c=Nc(t,r);if(c===!1)return L("InvalidAttr","Attributes for '"+l+"' have open quote.",M(t,r));let u=c.value;if(r=c.index,u[u.length-1]==="/"){let f=r-u.length;u=u.substring(0,u.length-1);let d=Pr(u,e);if(d===!0)i=!0;else return L(d.err.code,d.err.msg,M(t,f+d.err.line))}else if(a)if(c.tagClosed){if(u.trim().length>0)return L("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",M(t,o));if(s.length===0)return L("InvalidTag","Closing tag '"+l+"' has not been opened.",M(t,o));{let f=s.pop();if(l!==f.tagName){let d=M(t,f.tagStartPos);return L("InvalidTag","Expected closing tag '"+f.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+l+"'.",M(t,o))}s.length==0&&(n=!0)}}else return L("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",M(t,r));else{let f=Pr(u,e);if(f!==!0)return L(f.err.code,f.err.msg,M(t,r-u.length+f.err.line));if(n===!0)return L("InvalidXml","Multiple possible root nodes found.",M(t,r));e.unpairedTags.indexOf(l)!==-1||s.push({tagName:l,tagStartPos:o}),i=!0}for(r++;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="!"){r++,r=_r(t,r);continue}else if(t[r+1]==="?"){if(r=qr(t,++r),r.err)return r}else break;else if(t[r]==="&"){let f=vc(t,r);if(f==-1)return L("InvalidChar","char '&' is not expected.",M(t,r));r=f}else if(n===!0&&!Ir(t[r]))return L("InvalidXml","Extra text at the end",M(t,r));t[r]==="<"&&r--}}else{if(Ir(t[r]))continue;return L("InvalidChar","char '"+t[r]+"' is not expected.",M(t,r))}if(i){if(s.length==1)return L("InvalidTag","Unclosed tag '"+s[0].tagName+"'.",M(t,s[0].tagStartPos));if(s.length>0)return L("InvalidXml","Invalid '"+JSON.stringify(s.map(r=>r.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return L("InvalidXml","Start tag expected.",1);return!0}function Ir(t){return t===" "||t===" "||t===`
|
|
144
|
+
`||t==="\r"}function qr(t,e){let s=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let i=t.substr(s,e-s);if(e>5&&i==="xml")return L("InvalidXml","XML declaration allowed only at the start of the document.",M(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function _r(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let s=1;for(e+=8;e<t.length;e++)if(t[e]==="<")s++;else if(t[e]===">"&&(s--,s===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}var wc='"',Sc="'";function Nc(t,e){let s="",i="",n=!1;for(;e<t.length;e++){if(t[e]===wc||t[e]===Sc)i===""?i=t[e]:i!==t[e]||(i="");else if(t[e]===">"&&i===""){n=!0;break}s+=t[e]}return i!==""?!1:{value:s,index:e,tagClosed:n}}var Ac=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Pr(t,e){let s=Rt(t,Ac),i={};for(let n=0;n<s.length;n++){if(s[n][1].length===0)return L("InvalidAttr","Attribute '"+s[n][2]+"' has no space in starting.",Ge(s[n]));if(s[n][3]!==void 0&&s[n][4]===void 0)return L("InvalidAttr","Attribute '"+s[n][2]+"' is without value.",Ge(s[n]));if(s[n][3]===void 0&&!e.allowBooleanAttributes)return L("InvalidAttr","boolean attribute '"+s[n][2]+"' is not allowed.",Ge(s[n]));let r=s[n][2];if(!Tc(r))return L("InvalidAttr","Attribute '"+r+"' is an invalid name.",Ge(s[n]));if(!Object.prototype.hasOwnProperty.call(i,r))i[r]=1;else return L("InvalidAttr","Attribute '"+r+"' is repeated.",Ge(s[n]))}return!0}function Ec(t,e){let s=/\d/;for(t[e]==="x"&&(e++,s=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(s))break}return-1}function vc(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Ec(t,e);let s=0;for(;e<t.length;e++,s++)if(!(t[e].match(/\w/)&&s<20)){if(t[e]===";")break;return-1}return e}function L(t,e,s){return{err:{code:t,msg:e,line:s.line||s,col:s.col}}}function Tc(t){return ti(t)}function Cc(t){return ti(t)}function M(t,e){let s=t.substring(0,e).split(/\r?\n/);return{line:s.length,col:s[s.length-1].length+1}}function Ge(t){return t.startIndex+t[1].length}var si={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"};var Je={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},ii={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"};var Te=Object.freeze({ALLOW:"allow",BLOCK:"block",THROW:"throw"}),kc=new Set("!?\\\\/[]$%{}^&*()<>|+");function $r(t){if(t[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${t}"`);for(let e of t)if(kc.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${t}"`);return t}function We(...t){let e=Object.create(null);for(let s of t)if(s)for(let i of Object.keys(s)){let n=s[i];if(typeof n=="string")e[i]=n;else if(n&&typeof n=="object"&&n.val!==void 0){let r=n.val;typeof r=="string"&&(e[i]=r)}}return e}var me="external",Bt="base",ni="all";function xc(t){return!t||t===me?new Set([me]):t===ni?new Set([ni]):t===Bt?new Set([Bt]):Array.isArray(t)?new Set(t):new Set([me])}var $=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Oc=new Set([9,10,13]);function Lc(t){if(!t)return{xmlVersion:1,onLevel:$.allow,nullLevel:$.remove};let e=t.xmlVersion===1.1?1.1:1,s=$[t.onNCR]??$.allow,i=$[t.nullNCR]??$.remove,n=Math.max(i,$.remove);return{xmlVersion:e,onLevel:s,nullLevel:n}}var Ce=class{constructor(e={}){this._limit=e.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof e.postCheck=="function"?e.postCheck:i=>i,this._limitTiers=xc(this._limit.applyLimitsTo??me),this._numericAllowed=e.numericAllowed??!0,this._baseMap=We(Je,e.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(e.remove&&Array.isArray(e.remove)?e.remove:[]),this._leaveSet=new Set(e.leave&&Array.isArray(e.leave)?e.leave:[]);let s=Lc(e.ncr);this._ncrXmlVersion=s.xmlVersion,this._ncrOnLevel=s.onLevel,this._ncrNullLevel=s.nullLevel,this._onExternalEntity=typeof e.onExternalEntity=="function"?e.onExternalEntity:null,this._onInputEntity=typeof e.onInputEntity=="function"?e.onInputEntity:null}_applyRegistrationHook(e,s,i,n){if(!e)return!0;let r=e(s,i);if(r===Te.BLOCK)return!1;if(r===Te.THROW)throw new Error(`[EntityDecoder] Registration of ${n} entity "&${s};" was rejected by hook`);return!0}setExternalEntities(e){if(e)for(let n of Object.keys(e))$r(n);if(!this._onExternalEntity){this._externalMap=We(e);return}let s=We(e),i=Object.create(null);for(let[n,r]of Object.entries(s))this._applyRegistrationHook(this._onExternalEntity,n,r,"external")&&(i[n]=r);this._externalMap=i}addExternalEntity(e,s){$r(e),typeof s=="string"&&s.indexOf("&")===-1&&this._applyRegistrationHook(this._onExternalEntity,e,s,"external")&&(this._externalMap[e]=s)}addInputEntities(e){if(this._totalExpansions=0,this._expandedLength=0,!this._onInputEntity){this._inputMap=We(e);return}let s=We(e),i=Object.create(null);for(let[n,r]of Object.entries(s))this._applyRegistrationHook(this._onInputEntity,n,r,"input")&&(i[n]=r);this._inputMap=i}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(e){this._ncrXmlVersion=e===1.1?1.1:1}decode(e){if(typeof e!="string"||e.length===0||e.indexOf("&")===-1)return e;let s=e,i=[],n=e.length,r=0,o=0,a=this._maxTotalExpansions>0,l=this._maxExpandedLength>0,c=a||l;for(;o<n;){if(e.charCodeAt(o)!==38){o++;continue}let f=o+1;for(;f<n&&e.charCodeAt(f)!==59&&f-o<=32;)f++;if(f>=n||e.charCodeAt(f)!==59){o++;continue}let d=e.slice(o+1,f);if(d.length===0){o++;continue}let h,g;if(this._removeSet.has(d))h="",g===void 0&&(g=me);else if(this._leaveSet.has(d)){o++;continue}else if(d.charCodeAt(0)===35){let p=this._resolveNCR(d);if(p===void 0){o++;continue}h=p,g=Bt}else{let p=this._resolveName(d);h=p?.value,g=p?.tier}if(h===void 0){o++;continue}if(o>r&&i.push(e.slice(r,o)),i.push(h),r=f+1,o=r,c&&this._tierCounts(g)){if(a&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(l){let p=h.length-(d.length+2);if(p>0&&(this._expandedLength+=p,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}r<n&&i.push(e.slice(r));let u=i.length===0?e:i.join("");return this._postCheck(u,s)}_tierCounts(e){return this._limitTiers.has(ni)?!0:this._limitTiers.has(e)}_resolveName(e){if(e in this._inputMap)return{value:this._inputMap[e],tier:me};if(e in this._externalMap)return{value:this._externalMap[e],tier:me};if(e in this._baseMap)return{value:this._baseMap[e],tier:Bt}}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!Oc.has(e)?$.remove:-1}_applyNCRAction(e,s,i){switch(e){case $.allow:return String.fromCodePoint(i);case $.remove:return"";case $.leave:return;case $.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${s}; (U+${i.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(i)}}_resolveNCR(e){let s=e.charCodeAt(1),i;if(s===120||s===88?i=parseInt(e.slice(2),16):i=parseInt(e.slice(1),10),Number.isNaN(i)||i<0||i>1114111)return;let n=this._classifyNCR(i);if(!this._numericAllowed&&n<$.remove)return;let r=n===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,n);return this._applyNCRAction(r,e,i)}};var Fr=t=>He.includes(t)?"__"+t:t,Ic={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0,unicode:!1},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,s){return t},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Fr};function qc(t,e){if(typeof t!="string")return;let s=t.toLowerCase();if(He.some(i=>s===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);if(jt.some(i=>s===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`)}function Rr(t,e){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:Math.max(1,t.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,t.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,t.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,t.maxExpandedLength??1e5),maxEntityCount:Math.max(1,t.maxEntityCount??1e3),allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null,appliesTo:t.appliesTo??"all"}:Rr(!0)}var jr=function(t){let e=Object.assign({},Ic,t),s=[{value:e.attributeNamePrefix,name:"attributeNamePrefix"},{value:e.attributesGroupName,name:"attributesGroupName"},{value:e.textNodeName,name:"textNodeName"},{value:e.cdataPropName,name:"cdataPropName"},{value:e.commentPropName,name:"commentPropName"}];for(let{value:i,name:n}of s)i&&qc(i,n);return e.onDangerousProperty===null&&(e.onDangerousProperty=Fr),e.processEntities=Rr(e.processEntities,e.htmlEntities),e.unpairedTagsSet=new Set(e.unpairedTags),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(i=>typeof i=="string"&&i.startsWith("*.")?".."+i.substring(2):i)),e};var Dt;typeof Symbol!="function"?Dt="@@xmlMetadata":Dt=Symbol("XML Node Metadata");var F=class{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,s){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:s})}addChild(e,s){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),s!==void 0&&(this.child[this.child.length-1][Dt]={startIndex:s})}static getMetaDataSymbol(){return Dt}};var Dr=":A-Za-z_\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",_c=Dr+"\\-\\.\\d\xB7\u0300-\u036F\u203F-\u2040",Vr=":A-Za-z_\xC0-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}",Pc=Vr+"\\-\\.\\d\xB7\u0300-\u036F\u0487\u203F-\u2040",ri=(t,e,s="")=>{let i=t.replace(":",""),n=e.replace(":",""),r=`[${i}][${n}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,s),ncName:new RegExp(`^${r}$`,s),qName:new RegExp(`^${r}(?::${r})?$`,s),nmToken:new RegExp(`^[${e}]+$`,s),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,s)}},Mc=ri(Dr,_c),$c=ri(Vr,Pc,"u"),Ur=":A-Za-z_",Fc=Ur+"\\-\\.\\d",Rc=ri(Ur,Fc),Kr=(t="1.0",e=!1)=>e?Rc:t==="1.1"?$c:Mc;var oi=(t,{xmlVersion:e="1.0",asciiOnly:s=!1}={})=>Kr(e,s).qName.test(t);var Br=["name","ncName","qName","nmToken","nmTokens"],Vt=(t,{xmlVersion:e="1.0",asciiOnly:s=!1,maxCacheSize:i=2048}={})=>{if(!Br.includes(t))throw new TypeError(`Unknown production "${t}". Must be one of: ${Br.join(", ")}`);let n=Kr(e,s)[t],r=new Map,o=a=>{let l=r.get(a);if(l!==void 0)return l;let c=n.test(a);return r.size<i&&r.set(a,c),c};return o.reset=()=>{r=new Map},o};var Xe=class{constructor(e,s){this.suppressValidationErr=!e,this.options=e,this.xmlVersion=s||1}setXmlVersion(e=1){this.xmlVersion=e}readDocType(e,s){let i=Object.create(null),n=0;if(e[s+3]==="O"&&e[s+4]==="C"&&e[s+5]==="T"&&e[s+6]==="Y"&&e[s+7]==="P"&&e[s+8]==="E"){s=s+9;let r=1,o=!1,a=!1,l="";for(;s<e.length;s++)if(e[s]==="<"&&!a){if(o&&ge(e,"!ENTITY",s)){s+=7;let c,u;if([c,u,s]=this.readEntityExp(e,s+1,this.suppressValidationErr),u.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);i[c]=u,n++}}else if(o&&ge(e,"!ELEMENT",s)){s+=8;let{index:c}=this.readElementExp(e,s+1);s=c}else if(o&&ge(e,"!ATTLIST",s))s+=8;else if(o&&ge(e,"!NOTATION",s)){s+=9;let{index:c}=this.readNotationExp(e,s+1,this.suppressValidationErr);s=c}else if(ge(e,"!--",s))a=!0;else throw new Error("Invalid DOCTYPE");r++,l=""}else if(e[s]===">"){if(a?e[s-1]==="-"&&e[s-2]==="-"&&(a=!1,r--):r--,r===0)break}else e[s]==="["?o=!0:l+=e[s];if(r!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:i,i:s}}readEntityExp(e,s){s=R(e,s);let i=s;for(;s<e.length&&!/\s/.test(e[s])&&e[s]!=='"'&&e[s]!=="'";)s++;let n=e.substring(i,s);if(ze(n,{xmlVersion:this.xmlVersion}),s=R(e,s),!this.suppressValidationErr){if(e.substring(s,s+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[s]==="%")throw new Error("Parameter entities are not supported")}let r="";if([s,r]=this.readIdentifierVal(e,s,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&r.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${r.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return s--,[n,r,s]}readNotationExp(e,s){s=R(e,s);let i=s;for(;s<e.length&&!/\s/.test(e[s]);)s++;let n=e.substring(i,s);!this.suppressValidationErr&&ze(n,{xmlVersion:this.xmlVersion}),s=R(e,s);let r=e.substring(s,s+6).toUpperCase();if(!this.suppressValidationErr&&r!=="SYSTEM"&&r!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);s+=r.length,s=R(e,s);let o=null,a=null;if(r==="PUBLIC")[s,o]=this.readIdentifierVal(e,s,"publicIdentifier"),s=R(e,s),(e[s]==='"'||e[s]==="'")&&([s,a]=this.readIdentifierVal(e,s,"systemIdentifier"));else if(r==="SYSTEM"&&([s,a]=this.readIdentifierVal(e,s,"systemIdentifier"),!this.suppressValidationErr&&!a))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:o,systemIdentifier:a,index:--s}}readIdentifierVal(e,s,i){let n="",r=e[s];if(r!=='"'&&r!=="'")throw new Error(`Expected quoted string, found "${r}"`);s++;let o=s;for(;s<e.length&&e[s]!==r;)s++;if(n=e.substring(o,s),e[s]!==r)throw new Error(`Unterminated ${i} value`);return s++,[s,n]}readElementExp(e,s){s=R(e,s);let i=s;for(;s<e.length&&!/\s/.test(e[s]);)s++;let n=e.substring(i,s);if(!this.suppressValidationErr&&!oi(n,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid element name: "${n}"`);s=R(e,s);let r="";if(e[s]==="E"&&ge(e,"MPTY",s))s+=4;else if(e[s]==="A"&&ge(e,"NY",s))s+=2;else if(e[s]==="("){s++;let o=s;for(;s<e.length&&e[s]!==")";)s++;if(r=e.substring(o,s),e[s]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[s]}"`);return{elementName:n,contentModel:r.trim(),index:s}}readAttlistExp(e,s){s=R(e,s);let i=s;for(;s<e.length&&!/\s/.test(e[s]);)s++;let n=e.substring(i,s);for(ze(n,{xmlVersion:this.xmlVersion}),s=R(e,s),i=s;s<e.length&&!/\s/.test(e[s]);)s++;let r=e.substring(i,s);if(!ze(r,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid attribute name: "${r}"`);s=R(e,s);let o="";if(e.substring(s,s+8).toUpperCase()==="NOTATION"){if(o="NOTATION",s+=8,s=R(e,s),e[s]!=="(")throw new Error(`Expected '(', found "${e[s]}"`);s++;let l=[];for(;s<e.length&&e[s]!==")";){let c=s;for(;s<e.length&&e[s]!=="|"&&e[s]!==")";)s++;let u=e.substring(c,s);if(u=u.trim(),!ze(u,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid notation name: "${u}"`);l.push(u),e[s]==="|"&&(s++,s=R(e,s))}if(e[s]!==")")throw new Error("Unterminated list of notations");s++,o+=" ("+l.join("|")+")"}else{let l=s;for(;s<e.length&&!/\s/.test(e[s]);)s++;o+=e.substring(l,s);let c=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!c.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}s=R(e,s);let a="";return e.substring(s,s+8).toUpperCase()==="#REQUIRED"?(a="#REQUIRED",s+=8):e.substring(s,s+7).toUpperCase()==="#IMPLIED"?(a="#IMPLIED",s+=7):[s,a]=this.readIdentifierVal(e,s,"ATTLIST"),{elementName:n,attributeName:r,attributeType:o,defaultValue:a,index:s}}},R=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function ge(t,e,s){for(let i=0;i<e.length;i++)if(e[i]!==t[s+i+1])return!1;return!0}function ze(t,e){if(oi(t,{xmlVersion:e}))return t;throw new Error(`Invalid entity name ${t}`)}var jc=[48,1632,1776,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,65296,120782,120792,120802,120812,120822,66720,68912,69734,69872,69942,70096,70384,70736,70864,71248,71360,71472,71904,72016,72688,72784,73040,73120,73552,92768,92864,93008,123200,123632,124144,125264,130032],Ut=255,Kt=new Map,Yr=65535,Hr=1632,ke=Hr,Bc=Yr-Hr+1,Yt=new Uint8Array(Bc).fill(Ut);for(let t of jc)for(let e=0;e<10;e++){let s=t+e;s<=Yr?Yt[s-ke]=e:Kt.set(s,e)}var Gr=48,Jr=57,Wr=45,Ht=new Set([8722,65293,65123]);function Dc(t){if(typeof t!="string")return t;let e=t.length;if(e===0)return t;let s=-1;for(let n=0;n<e;n++){let r=t.charCodeAt(n);if(!(r>=Gr&&r<=Jr||r===Wr)){if(r<ke){if(Ht.has(r)){s=n;break}continue}if(r>=55296&&r<=56319){if(n+1<e){let o=t.charCodeAt(n+1);if(o>=56320&&o<=57343){let a=65536+(r-55296<<10)+(o-56320);if(Kt.has(a)){s=n;break}}}continue}if(Yt[r-ke]!==Ut||Ht.has(r)){s=n;break}}}if(s===-1)return t;let i=[];s>0&&i.push(t.slice(0,s));for(let n=s;n<e;n++){let r=t.charCodeAt(n);if(r>=Gr&&r<=Jr||r===Wr){i.push(t[n]);continue}if(r<ke){i.push(Ht.has(r)?"-":t[n]);continue}if(r>=55296&&r<=56319){if(n+1<e){let a=t.charCodeAt(n+1);if(a>=56320&&a<=57343){let l=65536+(r-55296<<10)+(a-56320),c=Kt.get(l);if(c!==void 0){i.push(String.fromCharCode(c+48)),n++;continue}}}i.push(t[n]);continue}if(Ht.has(r)){i.push("-");continue}let o=Yt[r-ke];i.push(o!==Ut?String.fromCharCode(o+48):t[n])}return i.join("")}var zr=Dc;var Vc=/^[-+]?0x[a-fA-F0-9]+$/,Uc=/^0b[01]+$/,Kc=/^0o[0-7]+$/,Yc=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Hc={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original",unicode:!1};function li(t,e={}){if(e=Object.assign({},Hc,e),!t||typeof t!="string")return t;let s=t.trim();if(s.length===0)return t;if(e.skipLike!==void 0&&e.skipLike.test(s))return t;if(s==="0"||e.unicode&&(s=zr(s),s==="0"))return 0;if(e.hex&&Vc.test(s))return ai(s,16);if(e.binary&&Uc.test(s))return ai(s,2);if(e.octal&&Kc.test(s))return ai(s,8);if(isFinite(s)){if(s.includes("e")||s.includes("E"))return Jc(t,s,e);{let i=Yc.exec(s);if(i){let n=i[1]||"",r=i[2],o=Wc(i[3]),a=n?t[r.length+1]===".":t[r.length]===".";if(!e.leadingZeros&&(r.length>1||r.length===1&&!a))return t;{let l=Number(s),c=String(l);if(l===0)return l;if(c.search(/[eE]/)!==-1)return e.eNotation?l:t;if(s.indexOf(".")!==-1)return c==="0"||c===o||c===`${n}${o}`?l:t;let u=r?o:s;return r?u===c||n+u===c?l:t:u===c||u===n+c?l:t}}else return t}}else return zc(t,Number(s),e)}var Gc=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Jc(t,e,s){if(!s.eNotation)return t;let i=e.match(Gc);if(i){let n=i[1]||"",r=i[3].indexOf("e")===-1?"E":"e",o=i[2],a=n?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:o.length===1&&(i[3].startsWith(`.${r}`)||i[3][0]===r)?Number(e):o.length>0?s.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}else return t}function Wc(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substring(0,t.length-1))),t}function ai(t,e){let s=t.trim();if((e===2||e===8)&&(t=s.substring(2)),parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function zc(t,e,s){let i=e===1/0;switch(s.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return i?"Infinity":"-Infinity";default:return t}}function ci(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let s of t)if(typeof s=="string"&&e===s||s instanceof RegExp&&s.test(e))return!0}:()=>!1}var V=class{constructor(e,s={},i){this.pattern=e,this.separator=s.separator||".",this.segments=this._parse(e),this.data=i,this._hasDeepWildcard=this.segments.some(n=>n.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(n=>n.attrName!==void 0),this._hasPositionSelector=this.segments.some(n=>n.position!==void 0)}_parse(e){let s=[],i=0,n="";for(;i<e.length;)e[i]===this.separator?i+1<e.length&&e[i+1]===this.separator?(n.trim()&&(s.push(this._parseSegment(n.trim())),n=""),s.push({type:"deep-wildcard"}),i+=2):(n.trim()&&s.push(this._parseSegment(n.trim())),n="",i++):(n+=e[i],i++);return n.trim()&&s.push(this._parseSegment(n.trim())),s}_parseSegment(e){let s={type:"tag"},i=null,n=e,r=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(r&&(n=r[1]+r[3],r[2])){let u=r[2].slice(1,-1);u&&(i=u)}let o,a=n;if(n.includes("::")){let u=n.indexOf("::");if(o=n.substring(0,u).trim(),a=n.substring(u+2).trim(),!o)throw new Error(`Invalid namespace in pattern: ${e}`)}let l,c=null;if(a.includes(":")){let u=a.lastIndexOf(":"),f=a.substring(0,u).trim(),d=a.substring(u+1).trim();["first","last","odd","even"].includes(d)||/^nth\(\d+\)$/.test(d)?(l=f,c=d):l=a}else l=a;if(!l)throw new Error(`Invalid segment pattern: ${e}`);if(s.tag=l,o&&(s.namespace=o),i)if(i.includes("=")){let u=i.indexOf("=");s.attrName=i.substring(0,u).trim(),s.attrValue=i.substring(u+1).trim()}else s.attrName=i.trim();if(c){let u=c.match(/^nth\((\d+)\)$/);u?(s.position="nth",s.positionValue=parseInt(u[1],10)):s.position=c}return s}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}};var xe=class{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._deepByTerminalTag=new Map,this._patterns=new Set,this._sealed=!1}add(e){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(e.pattern))return this;if(this._patterns.add(e.pattern),e.hasDeepWildcard()){let r=e.segments[e.segments.length-1];if(r&&r.type!=="deep-wildcard"&&r.tag!=="*"){let o=r.tag;this._deepByTerminalTag.has(o)||this._deepByTerminalTag.set(o,[]),this._deepByTerminalTag.get(o).push(e)}else this._deepWildcards.push(e);return this}let s=e.length,n=e.segments[e.segments.length-1]?.tag;if(!n||n==="*")this._wildcardByDepth.has(s)||this._wildcardByDepth.set(s,[]),this._wildcardByDepth.get(s).push(e);else{let r=`${s}:${n}`;this._byDepthAndTag.has(r)||this._byDepthAndTag.set(r,[]),this._byDepthAndTag.get(r).push(e)}return this}addAll(e){for(let s of e)this.add(s);return this}has(e){return this._patterns.has(e.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(e){return this.findMatch(e)!==null}findMatch(e){let s=e.getDepth(),i=e.getCurrentTag(),n=`${s}:${i}`,r=this._byDepthAndTag.get(n);if(r){for(let l=0;l<r.length;l++)if(e.matches(r[l]))return r[l]}let o=this._wildcardByDepth.get(s);if(o){for(let l=0;l<o.length;l++)if(e.matches(o[l]))return o[l]}let a=this._deepByTerminalTag.get(i);if(a){for(let l=0;l<a.length;l++)if(e.matches(a[l]))return a[l]}for(let l=0;l<this._deepWildcards.length;l++)if(e.matches(this._deepWildcards[l]))return this._deepWildcards[l];return null}};var ui=class{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){let e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){let e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){let s=this._matcher.path;if(s.length!==0)return s[s.length-1].values?.[e]}hasAttr(e){let s=this._matcher.path;if(s.length===0)return!1;let i=s[s.length-1];return i.values!==void 0&&e in i.values}getAnyParentAttr(e){return this._matcher.getAnyParentAttr(e)}hasAnyParentAttr(e){return this._matcher.hasAnyParentAttr(e)}getPosition(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){let e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,s=!0){return this._matcher.toString(e,s)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},X=class{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new ui(this),this._keptAttrs=[]}push(e,s=null,i=null,n=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let r=this.path.length,o=this.siblingStacks[r];o||(o={counts:new Map,total:0},this.siblingStacks[r]=o);let a=i?`${i}:${e}`:e,l=o.counts.get(a)||0,c=o.total;o.counts.set(a,l+1),o.total++;let u={tag:e,position:c,counter:l};i!=null&&(u.namespace=i),s!=null&&(u.values=s),this.path.push(u);let f=this.path.length,d=n!==null?n.keep:null;if(d!=null&&d.length>0&&s)for(let h=0;h<d.length;h++){let g=d[h];s[g]!==void 0&&this._keptAttrs.push({depth:f,name:g,value:s[g]})}}pop(){if(this.path.length===0)return;this._pathStringCache=null;let e=this.path.pop();this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1);let s=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=s;)this._keptAttrs.pop();return e}updateCurrent(e){if(this.path.length>0){let s=this.path[this.path.length-1];e!=null&&(s.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let s=this.path[this.path.length-1];return s.values!==void 0&&e in s.values}getAnyParentAttr(e){let s=this._keptAttrs;for(let i=s.length-1;i>=0;i--)if(s[i].name===e)return s[i].value}hasAnyParentAttr(e){let s=this._keptAttrs;for(let i=s.length-1;i>=0;i--)if(s[i].name===e)return!0;return!1}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,s=!0){let i=e||this.separator;if(i===this.separator&&s===!0){if(this._pathStringCache!==null)return this._pathStringCache;let r=this.path.map(o=>o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(i);return this._pathStringCache=r,r}return this.path.map(r=>s&&r.namespace?`${r.namespace}:${r.tag}`:r.tag).join(i)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(e){let s=e.segments;return s.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(s):this._matchSimple(s)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let s=0;s<e.length;s++)if(!this._matchSegment(e[s],this.path[s],s===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let s=this.path.length-1,i=e.length-1;for(;i>=0&&s>=0;){let n=e[i];if(n.type==="deep-wildcard"){if(i--,i<0)return!0;let r=e[i],o=!1;for(let a=s;a>=0;a--)if(this._matchSegment(r,this.path[a],a===this.path.length-1)){s=a-1,i--,o=!0;break}if(!o)return!1}else{if(!this._matchSegment(n,this.path[s],s===this.path.length-1))return!1;s--,i--}}return i<0}_matchSegment(e,s,i){if(e.tag!=="*"&&e.tag!==s.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==s.namespace||e.attrName!==void 0&&(!i||!s.values||!(e.attrName in s.values)||e.attrValue!==void 0&&String(s.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!i)return!1;let n=s.counter??0;if(e.position==="first"&&n!==0)return!1;if(e.position==="odd"&&n%2!==1)return!1;if(e.position==="even"&&n%2!==0)return!1;if(e.position==="nth"&&n!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>e&&{counts:new Map(e.counts),total:e.total}),keptAttrs:this._keptAttrs.map(e=>({...e}))}}restore(e){this._pathStringCache=null,this.path=e.path.map(s=>({...s})),this.siblingStacks=e.siblingStacks.map(s=>s&&{counts:new Map(s.counts),total:s.total}),this._keptAttrs=(e.keptAttrs||[]).map(s=>({...s}))}readOnly(){return this._view}};var Xc=[{id:"html-script-open",description:"<script opening tag",pattern:/<script[\s>/]/i},{id:"html-script-close",description:"</script closing tag",pattern:/<\/script[\s>]/i},{id:"html-javascript-protocol",description:"javascript: URI scheme (with optional whitespace/encoding)",pattern:/j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i},{id:"html-vbscript-protocol",description:"vbscript: URI scheme",pattern:/vbscript[\t\n\r ]*:/i},{id:"html-data-html",description:"data:text/html URI \u2014 can execute scripts in browsers",pattern:/data[\t\n\r ]*:[\t\n\r ]*text\/html/i},{id:"html-data-xhtml",description:"data:application/xhtml+xml URI",pattern:/data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i},{id:"html-data-svg",description:"data:image/svg+xml URI \u2014 can execute scripts",pattern:/data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i},{id:"html-inline-event-handler",description:"Inline event handler attributes: onclick=, onerror=, onload=, etc.",pattern:/\bon\w{1,30}\s*=/i},{id:"html-entity-obfuscated-script",description:"HTML-entity-encoded <script (e.g. <script or <script)",pattern:/(?:�*3[Cc];?|�*60;?|<)\s*script/i},{id:"html-entity-obfuscated-javascript",description:'HTML-entity-encoded javascript: (partial \u2014 catches common j or j for "j")',pattern:/(?:�*6[Aa];?|�*106;?)\s*(?:�*61;?|a)[\s\S]{0,80}script\s*:/i},{id:"html-style-expression",description:"CSS expression() \u2014 IE-era code execution in style attributes",pattern:/style[\s\S]{0,20}expression\s*\(/i},{id:"html-object-embed",description:"<object or <embed tags that can load active content",pattern:/<(?:object|embed)[\s>/]/i},{id:"html-base-tag",description:"<base href= \u2014 can hijack all relative URLs on a page",pattern:/<base[\s>]/i},{id:"html-meta-refresh",description:'<meta http-equiv="refresh" \u2014 can redirect users',pattern:/<meta[\s\S]{0,40}http-equiv[\s\S]{0,20}refresh/i},{id:"html-srcdoc",description:"srcdoc= attribute on iframes \u2014 embeds HTML that can run scripts",pattern:/srcdoc\s*=/i},{id:"html-iframe",description:"<iframe tag",pattern:/<iframe[\s>/]/i},{id:"html-form",description:"<form tag \u2014 can be used for phishing / credential harvesting injection",pattern:/<form[\s>/]/i}],Oe=Xc;var Qc=[{id:"xml-cdata-injection",description:"CDATA section injection: <![CDATA[ breaks out of text node context",pattern:/<!\[CDATA\[/i},{id:"xml-cdata-close",description:"CDATA close sequence: ]]> can terminate an enclosing CDATA section",pattern:/\]\]>/},{id:"xml-processing-instruction",description:"XML processing instruction: <?xml-stylesheet or <?php etc.",pattern:/<\?(?:xml[\- ]|php|asp)/i},{id:"xml-doctype-injection",description:"DOCTYPE declaration embedded in content \u2014 can define entities",pattern:/<!DOCTYPE(?:[\s[]|$)/i},{id:"xml-entity-system",description:"SYSTEM keyword \u2014 used in external entity declarations (XXE)",pattern:/\bSYSTEM\s+["']/i},{id:"xml-entity-public",description:"PUBLIC keyword \u2014 used in external entity declarations (XXE)",pattern:/\bPUBLIC\s+["']/i},{id:"xml-entity-declaration",description:"<!ENTITY declaration \u2014 defines entities, potential XXE or entity expansion",pattern:/<!ENTITY[\s%]/i},{id:"xml-billion-laughs",description:"Entity reference chaining / billion laughs: repeated &eX; style references",pattern:/(?:&\w{1,20};){3,}/},{id:"xml-namespace-confusion",description:"xmlns: attribute injection \u2014 can redefine namespaces to confuse parsers",pattern:/\bxmlns\s*(?::\w{1,40})?\s*=/i},{id:"xml-comment-injection",description:"<!-- comment injection \u2014 can hide content from some parsers",pattern:/<!--/},{id:"xml-comment-close",description:"--> closes an enclosing XML comment",pattern:/-->/},{id:"xml-pi-close",description:"?> closes an enclosing processing instruction",pattern:/\?>/}],Le=Qc;var Zc=[{id:"svg-script-element",description:"<script element inside SVG executes JavaScript",pattern:/<script[\s>/]/i},{id:"svg-xlink-href-javascript",description:"xlink:href with javascript: \u2014 classic SVG XSS via <a> or <use>",pattern:/xlink\s*:\s*href\s*=\s*["']?\s*javascript\s*:/i},{id:"svg-href-javascript",description:"href= with javascript: in SVG context (<a>, <animate>, etc.)",pattern:/href\s*=\s*["']?\s*javascript\s*:/i},{id:"svg-foreignobject",description:"<foreignObject embeds HTML inside SVG \u2014 can execute scripts",pattern:/<foreignObject[\s>/]/i},{id:"svg-use-external",description:"<use xlink:href or href pointing to external resource (non-fragment URL)",pattern:/<use[\s\S]{0,60}(?:xlink\s*:\s*)?href\s*=\s*(?:["'][^#]|[^"'#\s>])/i},{id:"svg-animate-href",description:'<animate attributeName="href" \u2014 can dynamically change href to javascript:',pattern:/<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*href["']/i},{id:"svg-animate-xlinkhref",description:'<animate attributeName="xlink:href"',pattern:/<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*xlink\s*:\s*href["']/i},{id:"svg-set-javascript",description:'<set to="javascript:..." \u2014 sets an attribute to a javascript: URI',pattern:/<set[\s\S]{0,80}to\s*=\s*["']?\s*javascript\s*:/i},{id:"svg-event-handler",description:"SVG-specific event handler attributes: onload=, onerror=, onactivate=, etc.",pattern:/\bon(?:load|error|activate|begin|end|repeat|focus|blur|click|mouse\w{1,20}|key\w{1,20})\s*=/i},{id:"svg-handler-generic",description:"Generic on* handler catch-all for SVG attributes",pattern:/\bon\w{1,30}\s*=/i},{id:"svg-filter-feimage",description:"<feImage href= \u2014 filter primitive that can load external resources",pattern:/<feImage[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=/i},{id:"svg-image-external",description:"<image xlink:href with http/https or javascript protocol",pattern:/<image[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=\s*["']?\s*(?:https?|javascript)\s*:/i},{id:"svg-style-javascript",description:"style= attribute containing javascript: (e.g. background:url(javascript:...))",pattern:/style\s*=[\s\S]{0,60}javascript\s*:/i}],fi=Zc;var eu=[{id:"sql-block-comment-open",description:"SQL block comment open: /* ... */ \u2014 unusual in legitimate user text",pattern:/\/\*/},{id:"sql-union-select",description:"UNION SELECT \u2014 most common SQL injection aggregation attack",pattern:/\bUNION\s{1,20}(?:ALL\s{1,20})?SELECT\b/i},{id:"sql-drop-table",description:"DROP TABLE \u2014 destructive DDL injection",pattern:/\bDROP\s{1,20}TABLE\b/i},{id:"sql-drop-database",description:"DROP DATABASE \u2014 destructive DDL injection",pattern:/\bDROP\s{1,20}DATABASE\b/i},{id:"sql-insert-into",description:"INSERT INTO \u2014 data injection",pattern:/\bINSERT\s{1,20}INTO\b/i},{id:"sql-delete-from",description:"DELETE FROM \u2014 data deletion injection",pattern:/\bDELETE\s{1,20}FROM\b/i},{id:"sql-update-set",description:"UPDATE ... SET \u2014 data modification injection",pattern:/\bUPDATE\b[\s\S]{1,60}\bSET\b/i},{id:"sql-exec-xp",description:"EXEC xp_ \u2014 MSSQL extended stored procedure execution",pattern:/\bEXEC(?:UTE)?\s{1,20}xp_/i},{id:"sql-tautology-string",description:`Classic string tautology: ' OR '1'='1 or " OR "1"="1"`,pattern:/'\s{0,10}OR\s{0,10}'[^']{0,20}'\s*=\s*'[^']{0,20}/i},{id:"sql-tautology-numeric",description:"Numeric tautology: OR 1=1",pattern:/\bOR\s{1,10}1\s*=\s*1\b/i},{id:"sql-always-true-zero",description:"Numeric tautology: OR 0=0",pattern:/\bOR\s{1,10}0\s*=\s*0\b/i},{id:"sql-sleep-benchmark",description:"Time-based blind injection: SLEEP() or BENCHMARK()",pattern:/\b(?:SLEEP|BENCHMARK)\s*\(/i},{id:"sql-waitfor-delay",description:"MSSQL time-based blind injection: WAITFOR DELAY",pattern:/\bWAITFOR\s{1,20}DELAY\b/i},{id:"sql-char-function",description:"CHAR() function \u2014 used to obfuscate injected strings",pattern:/\bCHAR\s*\(\s*\d{1,3}/i},{id:"sql-information-schema",description:"INFORMATION_SCHEMA \u2014 reconnaissance query for table/column enumeration",pattern:/\bINFORMATION_SCHEMA\b/i}],Qe=eu;var tu=[{id:"shell-path-traversal-unix",description:"Unix path traversal: ../ \u2014 climbing the directory tree",pattern:/\.\.\//},{id:"shell-path-traversal-windows",description:"Windows path traversal: ..\\ \u2014 climbing the directory tree",pattern:/\.\.\\/},{id:"shell-path-traversal-encoded",description:"URL-encoded path traversal: %2e%2e or %2f variants",pattern:/%2e%2e|%2f\.\.|\.\.%2f/i},{id:"shell-null-byte",description:"Null byte injection: \\x00 or %00 \u2014 truncates strings in C-backed functions",pattern:/\x00|%00/},{id:"shell-semicolon",description:"Semicolon command separator: cmd1; cmd2",pattern:/;/},{id:"shell-pipe",description:"Pipe operator: cmd1 | cmd2",pattern:/\|/},{id:"shell-and-operator",description:"AND operator: cmd1 && cmd2",pattern:/&&/},{id:"shell-or-operator",description:"OR operator: cmd1 || cmd2",pattern:/\|\|/},{id:"shell-backtick",description:"Backtick command substitution: `cmd`",pattern:/`/},{id:"shell-dollar-paren",description:"Dollar-paren command substitution: $(cmd)",pattern:/\$\(/},{id:"shell-dollar-brace",description:"Dollar-brace variable expansion: ${var} \u2014 can be abused for injection",pattern:/\$\{/},{id:"shell-redirect-out",description:"Output redirection: cmd > file or cmd >> file",pattern:/>{1,2}/},{id:"shell-redirect-in",description:"Input redirection: cmd < file",pattern:/</},{id:"shell-newline-injection",description:"Newline injection: \\n or \\r \u2014 can inject new shell commands",pattern:/[\n\r]/},{id:"shell-glob-star",description:"Glob expansion: * or ? \u2014 can expand to unintended files",pattern:/[/\\][*?]/},{id:"shell-absolute-root",description:"Absolute root path injection: string starting with / or \\ (Windows UNC)",pattern:/^(?:\/|\\\\)/},{id:"shell-windows-drive",description:"Windows drive letter path injection: C:\\ or D:/",pattern:/^[a-zA-Z]:[/\\]/},{id:"shell-curl-wget",description:"curl/wget with URL or flags \u2014 can exfiltrate data or download payloads",pattern:/\b(?:curl|wget)\s+(?:https?:\/\/|ftp:\/\/|-)/i}],di=tu;var su=[{id:"redos-nested-quantifier-plus",description:"Nested + quantifier inside a group with outer quantifier: (a+)+, (.+b)*, etc.",pattern:/\([^)]*\+[^)]*\)[+*]/},{id:"redos-nested-quantifier-star",description:"Nested * quantifier: (a*)* or (a*)+ \u2014 catastrophic backtracking",pattern:/\([^)]*\*[^)]*\)[*+]/},{id:"redos-nested-groups",description:"Doubly nested quantified groups: ((a+)+) \u2014 guaranteed catastrophic",pattern:/\(\([^)]{0,40}\)[+*]\)[+*]/},{id:"redos-alternation-overlap",description:"Overlapping alternation under quantifier: (a|a)+ \u2014 ambiguous NFA paths",pattern:/\(([^|()]{1,20})\|(?:\1)(?:\|[^|()]{1,20}){0,5}\)[+*?]{1,2}/},{id:"redos-star-plus-concat",description:"(x*x)+ pattern \u2014 triggers super-linear backtracking",pattern:/\([^)]{0,10}\*[^)]{0,10}\)[+*]/},{id:"redos-dot-star-greedy",description:"(.*){n,} or (.+){n,} \u2014 repeated greedy dot quantifiers",pattern:/\(\.[*+]\)\{?\d/},{id:"redos-large-repetition",description:"Very large fixed or range repetition count {1000,} or {1000,n} \u2014 denial of service via backtracking",pattern:/\{\d{4,}(?:,\d*)?\}/},{id:"redos-catastrophic-alternation",description:"Long alternation with many similar branches \u2014 polynomial backtracking risk",pattern:/\([^)]{0,200}(?:\|[^|)]{0,50}){9,}\)/}],hi=su;var U=`["'\\s]*:`,iu=[{id:"nosql-where-operator",description:"$where \u2014 executes arbitrary JavaScript server-side in MongoDB",pattern:new RegExp(`\\$where${U}`,"i")},{id:"nosql-ne-operator",description:'$ne \u2014 "not equal" operator used to bypass equality checks',pattern:new RegExp(`\\$ne${U}`,"i")},{id:"nosql-gt-operator",description:'$gt \u2014 "greater than" used to bypass password/value checks',pattern:new RegExp(`\\$gte?${U}`,"i")},{id:"nosql-lt-operator",description:'$lt / $lte \u2014 "less than" bypass variants',pattern:new RegExp(`\\$lte?${U}`,"i")},{id:"nosql-regex-operator",description:"$regex \u2014 can be used to extract data character by character (blind injection)",pattern:new RegExp(`\\$regex${U}`,"i")},{id:"nosql-or-operator",description:"$or \u2014 logical OR; used to create always-true conditions",pattern:new RegExp(`\\$or${U}\\s*\\[`,"i")},{id:"nosql-and-operator",description:"$and \u2014 logical AND operator injection",pattern:new RegExp(`\\$and${U}\\s*\\[`,"i")},{id:"nosql-nor-operator",description:"$nor \u2014 logical NOR operator injection",pattern:new RegExp(`\\$nor${U}\\s*\\[`,"i")},{id:"nosql-exists-operator",description:"$exists \u2014 can enumerate fields to determine schema",pattern:new RegExp(`\\$exists${U}`,"i")},{id:"nosql-in-operator",description:"$in \u2014 matches any value in a list; can enumerate values",pattern:new RegExp(`\\$in${U}\\s*\\[`,"i")},{id:"nosql-expr-operator",description:"$expr \u2014 allows aggregation expressions in queries (MongoDB 3.6+)",pattern:new RegExp(`\\$expr${U}`,"i")},{id:"nosql-function-operator",description:"$function \u2014 executes arbitrary JavaScript in MongoDB 4.4+",pattern:new RegExp(`\\$function${U}`,"i")},{id:"nosql-accumulator-operator",description:"$accumulator \u2014 custom aggregation with arbitrary JS execution",pattern:new RegExp(`\\$accumulator${U}`,"i")},{id:"nosql-proto-pollution",description:"__proto__ \u2014 prototype pollution via object key injection",pattern:/__proto__/},{id:"nosql-constructor-prototype",description:"constructor.prototype \u2014 alternative prototype pollution vector (dot notation or JSON key)",pattern:/constructor[\s"':.,{\[]*prototype/i},{id:"nosql-proto-bracket",description:'["__proto__"] \u2014 bracket-notation prototype pollution',pattern:/\[["']__proto__["']\]/}],pi=iu;var nu=[{id:"log-crlf-injection",description:"CRLF injection: literal \\r or \\n embeds fake log lines",pattern:/[\r\n]/},{id:"log-url-encoded-crlf",description:"URL-encoded CRLF: %0d, %0a, %0D, %0A \u2014 decoded by some log parsers",pattern:/%0[dDaA]/},{id:"log-unicode-newline",description:"Unicode newline variants: U+2028 (line separator), U+2029 (paragraph separator)",pattern:/[\u2028\u2029]/},{id:"log-log4shell-jndi",description:"Log4Shell: ${jndi:...} triggers remote code execution in Apache Log4j",pattern:/\$\{jndi\s*:/i},{id:"log-log4shell-obfuscated",description:"Obfuscated Log4Shell: ${::-j}... lookup-bypass prefix used to evade WAF detection",pattern:/\$\{::-/},{id:"log-log4j-lookup",description:"Log4j lookup syntax: ${env:...}, ${sys:...}, ${ctx:...} \u2014 data exfiltration",pattern:/\$\{(?:env|sys|ctx|main|map|sd|web|docker|k8s|spring)\s*:/i},{id:"log-ssti-double-brace",description:"SSTI double-brace: {{expression}} \u2014 Jinja2, Twig, Handlebars, etc.",pattern:/\{\{[\s\S]{0,80}\}\}/},{id:"log-ssti-hash-brace",description:"SSTI hash-brace: #{expression} \u2014 Thymeleaf, Velocity, Ruby ERB",pattern:/#\{[\s\S]{0,80}\}/},{id:"log-ssti-dollar-brace",description:"SSTI/EL injection: ${expression with operators or method calls} \u2014 JSP EL, Freemarker, SpEL",pattern:/\$\{[^}]*(?:\.|\(|\*|\+|\bclass\b|\bruntime\b|\bprocess\b|\bexec\b)[^}]{0,80}\}/i},{id:"log-ssti-percent-tag",description:"SSTI ERB/ASP tag: <%= expression %> \u2014 Ruby ERB, ASP",pattern:/<%=[\s\S]{0,80}%>/},{id:"log-null-byte",description:"Null byte: \\x00 or %00 \u2014 can truncate log entries in C-backed loggers",pattern:/\x00|%00/},{id:"log-ansi-escape",description:"ANSI escape sequence: ESC[ \u2014 can manipulate terminal output when logs are tailed",pattern:/\x1b\[/}],mi=nu;var ru=[{id:"sql-line-comment",description:"SQL line comment: -- followed by whitespace or end of string",pattern:/--(?:\s|$)/},{id:"sql-stacked-query",description:"Stacked queries: semicolon immediately followed by a SQL keyword",pattern:/;\s{0,10}(?:SELECT|INSERT|UPDATE|DELETE|DROP|CREATE|ALTER|EXEC)\b/i},{id:"sql-hex-encoding",description:"Hex-encoded string injection: 0x41414141 style (MySQL)",pattern:/\b0x[0-9a-f]{4,}/i}],ou=[...Qe,...ru],gi=ou;Oe.label="HTML";Le.label="XML";fi.label="SVG";Qe.label="SQL";gi.label="SQL-STRICT";di.label="SHELL";hi.label="REDOS";pi.label="NOSQL";mi.label="LOG";var jg=Object.freeze({HTML:Oe,XML:Le,SVG:fi,SQL:Qe,"SQL-STRICT":gi,SHELL:di,REDOS:hi,NOSQL:pi,LOG:mi});function au(t){if(typeof t!="string")throw new TypeError(`is-unsafe: first argument must be a string, got ${typeof t}`)}function lu(t){if(!(t instanceof RegExp)){if(Array.isArray(t)){if(t.length===0)throw new TypeError("is-unsafe: context must not be an empty array");if(Array.isArray(t[0])){for(let e of t)if(!Array.isArray(e)||e.length===0)throw new TypeError("is-unsafe: each context in the array must be a non-empty pattern array (PatternList)")}return}throw new TypeError(`is-unsafe: second argument must be a PatternList (e.g. HTML), an array of PatternLists (e.g. [HTML, XML]), or a RegExp. Got: ${typeof t}`)}}function cu(t){return t instanceof RegExp?{lists:null,regex:t}:Array.isArray(t[0])?{lists:t,regex:null}:{lists:[t],regex:null}}function uu(t,e){let s=e.label??"CUSTOM";for(let i of e)if(i.pattern.test(t))return{context:s,id:i.id,description:i.description,pattern:i.pattern};return null}function Xr(t,e){au(t),lu(e);let{lists:s,regex:i}=cu(e);if(i)return i.test(t);for(let n of s)if(uu(t,n)!==null)return!0;return!1}function fu(t,e){if(!t)return{};let s=e.attributesGroupName?t[e.attributesGroupName]:t;if(!s)return{};let i={};for(let n in s)if(n.startsWith(e.attributeNamePrefix)){let r=n.substring(e.attributeNamePrefix.length);i[r]=s[n]}else i[n]=s[n];return i}function du(t){if(!t||typeof t!="string")return;let e=t.indexOf(":");if(e!==-1&&e>0){let s=t.substring(0,e);if(s!=="xmlns")return s}}var Ze=class{constructor(e,s){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=yu,this.parseTextData=hu,this.resolveNameSpace=pu,this.buildAttributesMap=gu,this.isItStopNode=Nu,this.replaceEntitiesValue=wu,this.readStopNodeData=vu,this.saveTextToParentTag=Su,this.addChild=bu,this.ignoreAttributesFn=ci(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.doctypefound=!1;let i={...Je};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?i=this.options.htmlEntities:this.options.htmlEntities===!0&&(i={...ii,...si}),this.entityDecoder=new Ce({namedEntities:{...i,...s},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo},onInputEntity:(r,o)=>Xr(o,[Oe,Le])?Te.BLOCK:Te.ALLOW})),this.matcher=new X,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new xe;let n=this.options.stopNodes;if(n&&n.length>0){for(let r=0;r<n.length;r++){let o=n[r];typeof o=="string"?this.stopNodeExpressionsSet.add(new V(o)):o instanceof V&&this.stopNodeExpressionsSet.add(o)}this.stopNodeExpressionsSet.seal()}}};function hu(t,e,s,i,n,r,o){let a=this.options;if(t!==void 0&&(a.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t,e,s));let l=a.jPath?s.toString():s,c=a.tagValueProcessor(e,t,l,n,r);return c==null?t:typeof c!=typeof t||c!==t?c:a.trimValues||t.trim()===t?wi(t,a.parseTagValue,a.numberParseOptions):t}}function pu(t){if(this.options.removeNSPrefix){let e=t.split(":"),s=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=s+e[1])}return t}var mu=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function gu(t,e,s,i=!1){let n=this.options;if(i===!0||n.ignoreAttributes!==!0&&typeof t=="string"){let r=Rt(t,mu),o=r.length,a={},l=new Array(o),c=!1,u={};for(let h=0;h<o;h++){let g=this.resolveNameSpace(r[h][1]),p=r[h][4];if(g.length&&p!==void 0){let m=p;n.trimValues&&(m=m.trim()),m=this.replaceEntitiesValue(m,s,this.readonlyMatcher),l[h]=m,u[g]=m,c=!0}}c&&typeof e=="object"&&e.updateCurrent&&e.updateCurrent(u);let f=n.jPath?e.toString():this.readonlyMatcher,d=!1;for(let h=0;h<o;h++){let g=this.resolveNameSpace(r[h][1]);if(this.ignoreAttributesFn(g,f))continue;let p=n.attributeNamePrefix+g;if(g.length)if(n.transformAttributeName&&(p=n.transformAttributeName(p)),p=Qr(p,n),r[h][4]!==void 0){let m=l[h],b=n.attributeValueProcessor(g,m,f);b==null?a[p]=m:typeof b!=typeof m||b!==m?a[p]=b:a[p]=wi(m,n.parseAttributeValue,n.numberParseOptions),d=!0}else n.allowBooleanAttributes&&(a[p]=!0,d=!0)}if(!d)return;if(n.attributesGroupName&&!n.preserveOrder){let h={};return h[n.attributesGroupName]=a,h}return a}}var yu=function(t){t=t.replace(/\r\n?/g,`
|
|
145
|
+
`);let e=new F("!xml"),s=e,i="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0,this.doctypefound=!1;let n=this.options,r=new Xe(n.processEntities),o=t.length;for(let a=0;a<o;a++)if(t[a]==="<"){let c=t.charCodeAt(a+1);if(c===47){let u=Ie(t,">",a,"Closing Tag is not closed."),f=t.substring(a+2,u).trim();if(n.removeNSPrefix){let h=f.indexOf(":");h!==-1&&(f=f.substr(h+1))}f=yi(n.transformTagName,f,"",n).tagName,s&&(i=this.saveTextToParentTag(i,s,this.readonlyMatcher));let d=this.matcher.getCurrentTag();if(f&&n.unpairedTagsSet.has(f))throw new Error(`Unpaired tag can not be used as closing tag: </${f}>`);d&&n.unpairedTagsSet.has(d)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=this.tagsNodeStack.pop(),i="",a=u}else if(c===63){let u=bi(t,a,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");i=this.saveTextToParentTag(i,s,this.readonlyMatcher);let f=this.buildAttributesMap(u.tagExp,this.matcher,u.tagName,!0);if(f){let d=f[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(d)||1),r.setXmlVersion(Number(d)||1)}if(!(n.ignoreDeclaration&&u.tagName==="?xml"||n.ignorePiTags)){let d=new F(u.tagName);d.add(n.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&n.ignoreAttributes!==!0&&(d[":@"]=f),this.addChild(s,d,this.readonlyMatcher,a)}a=u.closeIndex+1}else if(c===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let u=Ie(t,"-->",a+4,"Comment is not closed.");if(n.commentPropName){let f=t.substring(a+4,u-2);i=this.saveTextToParentTag(i,s,this.readonlyMatcher),s.add(n.commentPropName,[{[n.textNodeName]:f}])}a=u}else if(c===33&&t.charCodeAt(a+2)===68){if(this.doctypefound)throw new Error("Multiple DOCTYPE declarations found.");this.doctypefound=!0;let u=r.readDocType(t,a);this.entityDecoder.addInputEntities(u.entities),a=u.i}else if(c===33&&t.charCodeAt(a+2)===91){let u=Ie(t,"]]>",a,"CDATA is not closed.")-2,f=t.substring(a+9,u);i=this.saveTextToParentTag(i,s,this.readonlyMatcher);let d=this.parseTextData(f,s.tagname,this.readonlyMatcher,!0,!1,!0,!0);d==null&&(d=""),n.cdataPropName?s.add(n.cdataPropName,[{[n.textNodeName]:f}]):s.add(n.textNodeName,d),a=u+2}else{let u=bi(t,a,n.removeNSPrefix);if(!u){let E=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${E}"`)}let f=u.tagName,d=u.rawTagName,h=u.tagExp,g=u.attrExpPresent,p=u.closeIndex;if({tagName:f,tagExp:h}=yi(n.transformTagName,f,h,n),n.strictReservedNames&&(f===n.commentPropName||f===n.cdataPropName||f===n.textNodeName||f===n.attributesGroupName))throw new Error(`Invalid tag name: ${f}`);s&&i&&s.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,s,this.readonlyMatcher,!1));let m=s;m&&n.unpairedTagsSet.has(m.tagname)&&(s=this.tagsNodeStack.pop(),this.matcher.pop());let b=!1;h.length>0&&h.lastIndexOf("/")===h.length-1&&(b=!0,f[f.length-1]==="/"?(f=f.substr(0,f.length-1),h=f):h=h.substr(0,h.length-1),g=f!==h);let y=null,A={},S;S=du(d),f!==e.tagname&&this.matcher.push(f,{},S),f!==h&&g&&(y=this.buildAttributesMap(h,this.matcher,f),y&&(A=fu(y,n))),f!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let v=a;if(this.isCurrentNodeStopNode){let E="";if(b)a=u.closeIndex;else if(n.unpairedTagsSet.has(f))a=u.closeIndex;else{let N=this.readStopNodeData(t,d,p+1);if(!N)throw new Error(`Unexpected end of ${d}`);a=N.i,E=N.tagContent}let C=new F(f);y&&(C[":@"]=y),C.add(n.textNodeName,E),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(s,C,this.readonlyMatcher,v)}else{if(b){({tagName:f,tagExp:h}=yi(n.transformTagName,f,h,n));let E=new F(f);y&&(E[":@"]=y),this.addChild(s,E,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(f)){let E=new F(f);y&&(E[":@"]=y),this.addChild(s,E,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=u.closeIndex;continue}else{let E=new F(f);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(s),y&&(E[":@"]=y),this.addChild(s,E,this.readonlyMatcher,v),s=E}i="",a=p}}}else i+=t[a];return e.child};function bu(t,e,s,i){this.options.captureMetaData||(i=void 0);let n=this.options.jPath?s.toString():s,r=this.options.updateTag(e.tagname,n,e[":@"]);r===!1||(typeof r=="string"&&(e.tagname=r),t.addChild(e,i))}function wu(t,e,s){let i=this.options.processEntities;if(!i||!i.enabled)return t;if(i.allowedTags){let n=this.options.jPath?s.toString():s;if(!(Array.isArray(i.allowedTags)?i.allowedTags.includes(e):i.allowedTags(e,n)))return t}if(i.tagFilter){let n=this.options.jPath?s.toString():s;if(!i.tagFilter(e,n))return t}return this.entityDecoder.decode(t)}function Su(t,e,s,i){return t&&(i===void 0&&(i=e.child.length===0),t=this.parseTextData(t,e.tagname,s,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,i),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function Nu(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function Au(t,e,s=">"){let i=0,n=t.length,r=s.charCodeAt(0),o=s.length>1?s.charCodeAt(1):-1,a="",l=e;for(let c=e;c<n;c++){let u=t.charCodeAt(c);if(i)u===i&&(i=0);else if(u===34||u===39)i=u;else if(u===r)if(o!==-1){if(t.charCodeAt(c+1)===o)return a+=t.substring(l,c),{data:a,index:c}}else return a+=t.substring(l,c),{data:a,index:c};else u===9&&!i&&(a+=t.substring(l,c)+" ",l=c+1)}}function Ie(t,e,s,i){let n=t.indexOf(e,s);if(n===-1)throw new Error(i);return n+e.length-1}function Eu(t,e,s,i){let n=t.indexOf(e,s);if(n===-1)throw new Error(i);return n}function bi(t,e,s,i=">"){let n=Au(t,e+1,i);if(!n)return;let r=n.data,o=n.index,a=r.search(/\s/),l=r,c=!0;a!==-1&&(l=r.substring(0,a),r=r.substring(a+1).trimStart());let u=l;if(s){let f=l.indexOf(":");f!==-1&&(l=l.substr(f+1),c=l!==n.data.substr(f+1))}return{tagName:l,tagExp:r,closeIndex:o,attrExpPresent:c,rawTagName:u}}function vu(t,e,s){let i=s,n=1,r=t.length;for(;s<r;s++)if(t[s]==="<"){let o=t.charCodeAt(s+1);if(o===47){let a=Eu(t,">",s,`${e} is not closed`);if(t.substring(s+2,a).trim()===e&&(n--,n===0))return{tagContent:t.substring(i,s),i:a};s=a}else if(o===63)s=Ie(t,"?>",s+1,"StopNode is not closed.");else if(o===33&&t.charCodeAt(s+2)===45&&t.charCodeAt(s+3)===45)s=Ie(t,"-->",s+3,"StopNode is not closed.");else if(o===33&&t.charCodeAt(s+2)===91)s=Ie(t,"]]>",s,"StopNode is not closed.")-2;else{let a=bi(t,s,!1);a&&((a&&a.tagName)===e&&a.tagExp[a.tagExp.length-1]!=="/"&&n++,s=a.closeIndex)}}}function wi(t,e,s){if(e&&typeof t=="string"){let i=t.trim();return i==="true"?!0:i==="false"?!1:li(t,s)}else return Lr(t)?t:""}function yi(t,e,s,i){if(t){let n=t(e);s===e&&(s=n),e=n}return e=Qr(e,i),{tagName:e,tagExp:s}}function Qr(t,e){if(jt.includes(t))throw new Error(`[SECURITY] Invalid name: "${t}" is a reserved JavaScript keyword that could cause prototype pollution`);return He.includes(t)?e.onDangerousProperty(t):t}var Si=F.getMetaDataSymbol();function Tu(t,e){if(!t||typeof t!="object")return{};if(!e)return t;let s={};for(let i in t)if(i.startsWith(e)){let n=i.substring(e.length);s[n]=t[i]}else s[i]=t[i];return s}function Ni(t,e,s,i){return Zr(t,e,s,i)}function Zr(t,e,s,i){let n,r={};for(let o=0;o<t.length;o++){let a=t[o],l=Cu(a);if(l!==void 0&&l!==e.textNodeName){let c=Tu(a[":@"]||{},e.attributeNamePrefix);s.push(l,c)}if(l===e.textNodeName)n===void 0?n=a[l]:n+=""+a[l];else{if(l===void 0)continue;if(a[l]){let c=Zr(a[l],e,s,i),u=xu(c,e);if(Object.keys(c).length===0&&e.alwaysCreateTextNode&&(c[e.textNodeName]=""),a[":@"]?ku(c,a[":@"],i,e):Object.keys(c).length===1&&c[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?c=c[e.textNodeName]:Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""),a[Si]!==void 0&&typeof c=="object"&&c!==null&&(c[Si]=a[Si]),r[l]!==void 0&&Object.prototype.hasOwnProperty.call(r,l))Array.isArray(r[l])||(r[l]=[r[l]]),r[l].push(c);else{let f=e.jPath?i.toString():i;e.isArray(l,f,u)?r[l]=[c]:r[l]=c}l!==void 0&&l!==e.textNodeName&&s.pop()}}}return typeof n=="string"?n.length>0&&(r[e.textNodeName]=n):n!==void 0&&(r[e.textNodeName]=n),r}function Cu(t){let e=Object.keys(t);for(let s=0;s<e.length;s++){let i=e[s];if(i!==":@")return i}}function ku(t,e,s,i){if(e){let n=Object.keys(e),r=n.length;for(let o=0;o<r;o++){let a=n[o],l=a.startsWith(i.attributeNamePrefix)?a.substring(i.attributeNamePrefix.length):a,c=i.jPath?s.toString()+"."+l:s;i.isArray(a,c,!0,!0)?t[a]=[e[a]]:t[a]=e[a]}}}function xu(t,e){let{textNodeName:s}=e,i=Object.keys(t).length;return!!(i===0||i===1&&(t[s]||typeof t[s]=="boolean"||t[s]===0))}var qe=class{constructor(e){this.externalEntities={},this.options=jr(e)}parse(e,s){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(s){s===!0&&(s={});let r=Mr(e,s);if(r!==!0)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}let i=new Ze(this.options,this.externalEntities),n=i.parseXml(e);return this.options.preserveOrder||n===void 0?n:Ni(n,this.options,i.matcher,i.readonlyMatcher)}addEntity(e,s){if(s.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(s==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=s}static getMetaDataSymbol(){return F.getMetaDataSymbol()}};function et(t){return String(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function Gt(t){return String(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function Q(t){return String(t).replace(/"/g,""").replace(/'/g,"'")}var Ou=`
|
|
146
|
+
`;function Lu(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let s=t[0];if(vi(s)==="?xml"){let n=s[":@"];if(n){let r=e.attributeNamePrefix+"version";if(n[r])return n[r]}}return"1.0"}function to(t,e,s,i,n){return!s.sanitizeName||n(t)?t:s.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()})}function Ei(t,e){let s="";e.format&&(s=Ou);let i=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let l=e.stopNodes[a];typeof l=="string"?i.push(new V(l)):l instanceof V&&i.push(l)}let n=Lu(t,e),r=Vt("qName",{xmlVersion:n}),o=new X;return so(t,e,s,o,i,r)}function so(t,e,s,i,n,r){let o="",a=!1;if(e.maxNestedTags&&i.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let l=t.toString();return l=Ai(l,e),l}return""}for(let l=0;l<t.length;l++){let c=t[l],u=vi(c);if(u===void 0)continue;let d=u===e.textNodeName||u===e.cdataPropName||u===e.commentPropName||u[0]==="?"?u:to(u,!1,e,i,r),h=Iu(c[":@"],e);i.push(d,h);let g=_u(i,n);if(d===e.textNodeName){let A=c[u];g||(A=e.tagValueProcessor(d,A),A=Ai(A,e)),a&&(o+=s),o+=A,a=!1,i.pop();continue}else if(d===e.cdataPropName){a&&(o+=s);let A=c[u][0][e.textNodeName],S=Gt(A);o+=`<![CDATA[${S}]]>`,a=!1,i.pop();continue}else if(d===e.commentPropName){let A=c[u][0][e.textNodeName],S=et(A);o+=s+`<!--${S}-->`,a=!0,i.pop();continue}else if(d[0]==="?"){let A=eo(c[":@"],e,g,i,r);o+=(d==="?xml"?"":s)+`<${d}${A}?>`,a=!0,i.pop();continue}let p=s;p!==""&&(p+=e.indentBy);let m=eo(c[":@"],e,g,i,r),b=s+`<${d}${m}`,y;g?y=io(c[u],e):y=so(c[u],e,p,i,n,r),e.unpairedTags.indexOf(d)!==-1?e.suppressUnpairedNode?o+=b+">":o+=b+"/>":(!y||y.length===0)&&e.suppressEmptyNode?o+=b+"/>":y&&y.endsWith(">")?o+=b+`>${y}${s}</${d}>`:(o+=b+">",y&&s!==""&&(y.includes("/>")||y.includes("</"))?o+=s+e.indentBy+y+s:o+=y,o+=`</${d}>`),a=!0,i.pop()}return o}function Iu(t,e){if(!t||e.ignoreAttributes)return null;let s={},i=!1;for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=n.startsWith(e.attributeNamePrefix)?n.substr(e.attributeNamePrefix.length):n;s[r]=Q(t[n]),i=!0}return i?s:null}function io(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let s="";for(let i=0;i<t.length;i++){let n=t[i],r=vi(n);if(r===e.textNodeName)s+=n[r];else if(r===e.cdataPropName)s+=n[r][0][e.textNodeName];else if(r===e.commentPropName)s+=n[r][0][e.textNodeName];else{if(r&&r[0]==="?")continue;if(r){let o=qu(n[":@"],e),a=io(n[r],e);!a||a.length===0?s+=`<${r}${o}/>`:s+=`<${r}${o}>${a}</${r}>`}}}return s}function qu(t,e){let s="";if(t&&!e.ignoreAttributes)for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let n=t[i];n===!0&&e.suppressBooleanAttributes?s+=` ${i.substr(e.attributeNamePrefix.length)}`:s+=` ${i.substr(e.attributeNamePrefix.length)}="${Q(n)}"`}return s}function vi(t){let e=Object.keys(t);for(let s=0;s<e.length;s++){let i=e[s];if(Object.prototype.hasOwnProperty.call(t,i)&&i!==":@")return i}}function eo(t,e,s,i,n){let r="";if(t&&!e.ignoreAttributes)for(let o in t){if(!Object.prototype.hasOwnProperty.call(t,o))continue;let a=o.substr(e.attributeNamePrefix.length),l=s?a:to(a,!0,e,i,n),c;s?c=t[o]:(c=e.attributeValueProcessor(o,t[o]),c=Ai(c,e)),c===!0&&e.suppressBooleanAttributes?r+=` ${l}`:r+=` ${l}="${Q(c)}"`}return r}function _u(t,e){if(!e||e.length===0)return!1;for(let s=0;s<e.length;s++)if(t.matches(e[s]))return!0;return!1}function Ai(t,e){if(t&&t.length>0&&e.processEntities)for(let s=0;s<e.entities.length;s++){let i=e.entities[s];t=t.replace(i.regex,i.val)}return t}function Ti(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let s of t)if(typeof s=="string"&&e===s||s instanceof RegExp&&s.test(e))return!0}:()=>!1}var Pu={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function j(t){if(this.options=Object.assign({},Pu,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let s=this.options.stopNodes[e];typeof s=="string"?this.stopNodeExpressions.push(new V(s)):s instanceof V&&this.stopNodeExpressions.push(s)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Ti(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Ru),this.processTextOrObjNode=$u,this.options.format?(this.indentate=Fu,this.tagEndChar=`>
|
|
147
|
+
`,this.newLine=`
|
|
148
|
+
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Mu(t,e){let s=t["?xml"];if(s&&typeof s=="object"){if(e.attributesGroupName&&s[e.attributesGroupName]){let n=s[e.attributesGroupName][e.attributeNamePrefix+"version"];if(n)return n}let i=s[e.attributeNamePrefix+"version"];if(i)return i}return"1.0"}function Ci(t,e,s,i,n){return!s.sanitizeName||n(t)?t:s.sanitizeName(t,{isAttribute:e,matcher:i.readOnly()})}j.prototype.build=function(t){if(this.options.preserveOrder)return Ei(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new X,s=Mu(t,this.options),i=Vt("qName",{xmlVersion:s});return this.j2x(t,0,e,i).val}};j.prototype.j2x=function(t,e,s,i){let n="",r="";if(this.options.maxNestedTags&&s.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let o=this.options.jPath?s.toString():s,a=this.checkStopNode(s);for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;let u=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||l[0]==="?"?l:Ci(l,!1,this.options,s,i);if(typeof t[l]>"u")this.isAttribute(l)&&(r+="");else if(t[l]===null)this.isAttribute(l)||u===this.options.cdataPropName||u===this.options.commentPropName?r+="":u[0]==="?"?r+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if(t[l]instanceof Date)r+=this.buildTextValNode(t[l],u,"",e,s);else if(typeof t[l]!="object"){let f=this.isAttribute(l);if(f&&!this.ignoreAttributesFn(f,o)){let d=Ci(f,!0,this.options,s,i);n+=this.buildAttrPairStr(d,""+t[l],a)}else if(!f)if(l===this.options.textNodeName){let d=this.options.tagValueProcessor(l,""+t[l]);r+=this.replaceEntitiesValue(d)}else{s.push(u);let d=this.checkStopNode(s);if(s.pop(),d){let h=""+t[l];h===""?r+=this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:r+=this.indentate(e)+"<"+u+">"+h+"</"+u+this.tagEndChar}else r+=this.buildTextValNode(t[l],u,"",e,s)}}else if(Array.isArray(t[l])){let f=t[l].length,d="",h="";for(let g=0;g<f;g++){let p=t[l][g];if(!(typeof p>"u"))if(p===null)u[0]==="?"?r+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if(typeof p=="object")if(this.options.oneListGroup){s.push(u);let m=this.j2x(p,e+1,s,i);s.pop(),d+=m.val,this.options.attributesGroupName&&p.hasOwnProperty(this.options.attributesGroupName)&&(h+=m.attrStr)}else d+=this.processTextOrObjNode(p,u,e,s,i);else if(this.options.oneListGroup){let m=this.options.tagValueProcessor(u,p);m=this.replaceEntitiesValue(m),d+=m}else{s.push(u);let m=this.checkStopNode(s);if(s.pop(),m){let b=""+p;b===""?d+=this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:d+=this.indentate(e)+"<"+u+">"+b+"</"+u+this.tagEndChar}else d+=this.buildTextValNode(p,u,"",e,s)}}this.options.oneListGroup&&(d=this.buildObjectNode(d,u,h,e)),r+=d}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){let f=Object.keys(t[l]),d=f.length;for(let h=0;h<d;h++){let g=Ci(f[h],!0,this.options,s,i);n+=this.buildAttrPairStr(g,""+t[l][f[h]],a)}}else r+=this.processTextOrObjNode(t[l],u,e,s,i)}return{attrStr:n,val:r}};j.prototype.buildAttrPairStr=function(t,e,s){return s||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+Q(e)+'"'};function $u(t,e,s,i,n){let r=this.extractAttributes(t);if(i.push(e,r),this.checkStopNode(i)){let l=this.buildRawContent(t),c=this.buildAttributesForStopNode(t);return i.pop(),this.buildObjectNode(l,e,c,s)}let a=this.j2x(t,s+1,i,n);return i.pop(),e[0]==="?"?this.buildTextValNode("",e,a.attrStr,s,i):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,a.attrStr,s,i):this.buildObjectNode(a.val,e,a.attrStr,s)}j.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},s=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let i=t[this.options.attributesGroupName];for(let n in i){if(!Object.prototype.hasOwnProperty.call(i,n))continue;let r=n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n;e[r]=Q(i[n]),s=!0}}else for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let n=this.isAttribute(i);n&&(e[n]=Q(t[i]),s=!0)}return s?e:null};j.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s)||this.isAttribute(s)||this.options.attributesGroupName&&s===this.options.attributesGroupName)continue;let i=t[s];if(s===this.options.textNodeName)e+=i;else if(Array.isArray(i)){for(let n of i)if(typeof n=="string"||typeof n=="number")e+=`<${s}>${n}</${s}>`;else if(typeof n=="object"&&n!==null){let r=this.buildRawContent(n),o=this.buildAttributesForStopNode(n);r===""?e+=`<${s}${o}/>`:e+=`<${s}${o}>${r}</${s}>`}}else if(typeof i=="object"&&i!==null){let n=this.buildRawContent(i),r=this.buildAttributesForStopNode(i);n===""?e+=`<${s}${r}/>`:e+=`<${s}${r}>${n}</${s}>`}else e+=`<${s}>${i}</${s}>`}return e};j.prototype.buildAttributesForStopNode=function(t){if(!t||typeof t!="object")return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let s=t[this.options.attributesGroupName];for(let i in s){if(!Object.prototype.hasOwnProperty.call(s,i))continue;let n=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i,r=s[i];r===!0&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+Q(r)+'"'}}else for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=this.isAttribute(s);if(i){let n=t[s];n===!0&&this.options.suppressBooleanAttributes?e+=" "+i:e+=" "+i+'="'+Q(n)+'"'}}return e};j.prototype.buildObjectNode=function(t,e,s,i){if(t==="")return e[0]==="?"?this.indentate(i)+"<"+e+s+"?"+this.tagEndChar:this.indentate(i)+"<"+e+s+this.closeTag(e)+this.tagEndChar;if(e[0]==="?")return this.indentate(i)+"<"+e+s+"?"+this.tagEndChar;{let n="</"+e+this.tagEndChar,r="";return e[0]==="?"&&(r="?",n=""),(s||s==="")&&t.indexOf("<")===-1?this.indentate(i)+"<"+e+s+r+">"+t+n:this.options.commentPropName!==!1&&e===this.options.commentPropName&&r.length===0?this.indentate(i)+`<!--${et(t)}-->`+this.newLine:this.indentate(i)+"<"+e+s+r+this.tagEndChar+t+this.indentate(i)+n}};j.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e};j.prototype.checkStopNode=function(t){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let e=0;e<this.stopNodeExpressions.length;e++)if(t.matches(this.stopNodeExpressions[e]))return!0;return!1};j.prototype.buildTextValNode=function(t,e,s,i,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName){let r=Gt(t);return this.indentate(i)+`<![CDATA[${r}]]>`+this.newLine}else if(this.options.commentPropName!==!1&&e===this.options.commentPropName){let r=et(t);return this.indentate(i)+`<!--${r}-->`+this.newLine}else{if(e[0]==="?")return this.indentate(i)+"<"+e+s+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,t);return r=this.replaceEntitiesValue(r),r===""?this.indentate(i)+"<"+e+s+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+s+">"+r+"</"+e+this.tagEndChar}}};j.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){let s=this.options.entities[e];t=t.replace(s.regex,s.val)}return t};function Fu(t){return this.options.indentBy.repeat(t)}function Ru(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}var ki=j;var Xs=Qs(lo(),1),gr=Qs(pc(),1);function ju(t,e){let s=t.slice(0,e).split(/\r?\n/);return[s.length,s.pop().length+1]}function Bu(t,e,s){let i=t.split(/\r?\n/),n="",r=(Math.log10(e+1)|0)+1;for(let o=e-1;o<=e+1;o++){let a=i[o-1];a&&(n+=o.toString().padEnd(r," "),n+=": ",n+=a,n+=`
|
|
149
|
+
`,o===e&&(n+=" ".repeat(r+s+2),n+=`^
|
|
150
|
+
`))}return n}var T=class t extends Error{line;column;codeblock;constructor(e,s){let[i,n]=ju(s.toml,s.ptr),r=Bu(s.toml,i,n);super(`Invalid TOML document: ${e}
|
|
151
|
+
|
|
152
|
+
${r}`,s),this.line=i,this.column=n,this.codeblock=r}static x(e,s,i){throw new t(e,{toml:s.s,ptr:i??s.p})}};function Wt(t){let e=t.p,s=t.s.charCodeAt(t.p++),i=s,n=s===39,r=s===t.s.charCodeAt(t.p)&&s===t.s.charCodeAt(t.p+1);r&&((s=t.s.charCodeAt(t.p+=2))===10?t.p++:s===13&&t.s.charCodeAt(t.p+1)===10&&(t.p+=2));let o="",a=t.p,l=0;for(;t.p<t.s.length;t.p++)if(s=t.s.charCodeAt(t.p),r&&(s===10||s===13&&t.s.charCodeAt(t.p+1)===10))l=l&&3;else if(s<32&&s!==9||s===127)T.x("control characters are not allowed in strings",t);else if((!l||l===3)&&s===i&&(!r||t.s.charCodeAt(t.p+1)===i&&t.s.charCodeAt(t.p+2)===i)){if(r&&(t.s.charCodeAt(t.p+3)===i&&t.p++,t.s.charCodeAt(t.p+3)===i&&t.p++),!l){let c=t.s.slice(a,t.p);o=o?o+c:c}return t.p+=r?3:1,o}else if(!l)!n&&s===92&&(o+=t.s.slice(a,a=t.p),l=1);else if(l===1)if(s===120||s===117||s===85){let c=t.p++-1,u=0,f=s===120?2:s===117?4:8;for(let d=0;d<f;d++,t.p++){let h=t.s.charCodeAt(t.p),g=h>=48&&h<=57?h-48:h>=65&&h<=70?h-65+10:h>=97&&h<=102?h-97+10:-1;g<0&&T.x("invalid non-hex character in unicode escape",t),u=u<<4|g}(u<0||u>1114111||u>=55296&&u<=57343)&&T.x("invalid unicode escape",t,c),o+=String.fromCodePoint(u),a=t.p--,l=0}else r&&(s===32||s===9)?l=2:(s===98?o+="\b":s===116?o+=" ":s===110?o+=`
|
|
153
|
+
`:s===102?o+="\f":s===114?o+="\r":s===101?o+="\x1B":s===34?o+='"':s===92?o+="\\":T.x("unrecognised escape sequence",t),a=t.p+1,l=0);else s!==32&&s!==9&&(l===2&&T.x("invalid escape: only line-ending whitespace may be escaped",t,a),l=!n&&s===92?1:0,a=t.p);T.x("unfinished string",t,e)}var Du=/^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i,tt=class t extends Date{#t=!1;#s=!1;#e=null;constructor(e,s,i){let n=!0,r=!0,o="Z",a;if(typeof e=="string")if(s)e:{if(s<3){if(+e.slice(11,13)>23){e="";break e}s===2?(o=null,e+="Z"):(a=e.charCodeAt(e.length-1))!==90&&a!==122&&(o=e.slice(e.length-6)),i&&(e=e.slice(0,10)+"T"+e.slice(11))}else s===4&&(e=+e.slice(0,2)>23?"":`0000-01-01T${e}Z`);n=s!==4,r=s!==3}else{let l=e.match(Du);l?(l[1]||(n=!1,e=`0000-01-01T${e}`),r=!!l[2],r&&e[10]===" "&&(e=e.replace(" ","T")),l[2]&&+l[2]>23?e="":(o=l[3]||null,!o&&r&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=n,this.#s=r,this.#e=o)}isDateTime(){return this.#t&&this.#s}isLocal(){return!this.#t||!this.#s||!this.#e}isDate(){return this.#t&&!this.#s}isTime(){return this.#s&&!this.#t}isValid(){return this.#t||this.#s}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z"||this.#e==="z")return e;let s=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return s=this.#e[0]==="-"?s:-s,new Date(this.getTime()-s*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,s="Z"){let i=new t(e);return i.#e=s,i}static wrapAsLocalDateTime(e){let s=new t(e);return s.#e=null,s}static wrapAsLocalDate(e){let s=new t(e);return s.#s=!1,s.#e=null,s}static wrapAsLocalTime(e){let s=new t(e);return s.#t=!1,s.#e=null,s}};function K(t,e=10){return e===16?t>47&&t<58||t>64&&t<71||t>96&&t<103:t>47&&t<48+e}function Ii(t,e){return t===32||t===9||t===10||t===13||e&&(t===e||t===44)||t===35}function it(t,e){let s=t.p,i=t.s.charCodeAt(t.p);if(i===91||i===123){t.d--||T.x("document contains excessively nested structures. aborting.",t);let n=i===91?fo(t):uo(t);return t.d++,n}return i===34||i===39?Wt(t):i===116?((t.s.charCodeAt(++t.p)!==114||t.s.charCodeAt(++t.p)!==117||t.s.charCodeAt(++t.p)!==101)&&T.x("invalid value",t,s),t.p++,!0):i===102?((t.s.charCodeAt(++t.p)!==97||t.s.charCodeAt(++t.p)!==108||t.s.charCodeAt(++t.p)!==115||t.s.charCodeAt(++t.p)!==101)&&T.x("invalid value",t,s),t.p++,!1):i===43||i===45?zt(t,t.p,t.s.charCodeAt(++t.p),44-i,e):t.s.charCodeAt(t.p+4)===45&&t.s.charCodeAt(t.p+7)===45?Vu(t,i,e):t.s.charCodeAt(t.p+2)===58?Uu(t,i,e):zt(t,t.p,i,0,e)}function zt(t,e,s,i,n){let r=s,o=0,a=!1;if(r===105)return(t.s.charCodeAt(++t.p)!==110||t.s.charCodeAt(++t.p)!==102)&&T.x("invalid value",t,e),t.p++,(i||1)/0;if(r===110)return(t.s.charCodeAt(++t.p)!==97||t.s.charCodeAt(++t.p)!==110)&&T.x("invalid value",t,e),t.p++,NaN;if(r===48){if(++t.p>=t.s.length||Ii(r=t.s.charCodeAt(t.p),n))return t.bi===!0?0n:0;if(!i){if(r===120)return Li(t,e,16,n);if(r===98)return Li(t,e,2,n);if(r===111)return Li(t,e,8,n)}r===46?o=2:r===101||r===69?o=4:T.x("illegal leading zero",t,e)}else K(r)||T.x("invalid value",t,e);for(;++t.p<t.s.length&&(r=t.s.charCodeAt(t.p),!Ii(r,n));)o||(o=1),r===95?(o&1||T.x("illegal underscore",t),o+=11,a=!0):o===1&&r===46?o=2:(o===1||o===3)&&(r===101||r===69)?o=4:o===4&&(r===43||r===45)||(K(r)?o>9?o-=11:o&1||o++:T.x("illegal character in numeric literal",t));if(!o){let c=(s-48)*(i||1);return t.bi===!0?BigInt(c):c}o&1||T.x("unfinished numeric value",t,e);let l=t.s.slice(e,t.p);return a&&(l=l.replaceAll("_","")),o>1?parseFloat(l):co(t,l,10,e)}function Li(t,e,s,i){let n,r=1;for(;++t.p<t.s.length&&(n=t.s.charCodeAt(t.p),!Ii(n,i));)n===95?(r&1&&T.x("illegal underscore",t),r=3):K(n,s)?r&1&&r--:T.x("illegal character in numeric literal",t);r&1&&T.x("unfinished numeric value",t);let o=t.s.slice(e+2,t.p);return r&&(o=o.replaceAll("_","")),co(t,o,s,e)}function co(t,e,s,i){if(t.bi!==!0)e:{let n=parseInt(e,s);if(!Number.isSafeInteger(n)){if(t.bi)break e;T.x("integer value cannot be represented losslessly",t,i)}return n}return BigInt(s===10?e:(s===2?"0b":s===8?"0o":"0x")+e)}function Vu(t,e,s){let i=t.p++,n;if(!K(e)||!K(t.s.charCodeAt(t.p++))||!K(t.s.charCodeAt(t.p++))||!K(t.s.charCodeAt(t.p++)))return zt(t,t.p=i,e,0,s);if(t.p+=5,K(t.s.charCodeAt(t.p++))||T.x("invalid date-time: date part is malformed",t,i),t.p>=t.s.length||((e=t.s.charCodeAt(t.p))!==32||(n=!0,!K(t.s.charCodeAt(t.p+1))))&&e!==84&&e!==116){let o=t.s.slice(i,t.p);return st(t,o,3,!1,i)}if(t.s.charCodeAt(t.p+=3)!==58&&T.x("invalid date-time: time part is malformed",t,i),t.s.charCodeAt(t.p+=3)===58&&(t.p+=3),t.s.charCodeAt(t.p)===46)for(;K(t.s.charCodeAt(++t.p)););if(e=t.s.charCodeAt(t.p)){if(e===90||e===122){let o=t.s.slice(i,++t.p);return st(t,o,1,n,i,"[+00:00]")}if(e===43||e===45){let o=t.s.slice(i,t.p+=6);return st(t,o,1,n,i,!t.ld&&"["+t.s.slice(t.p-6,t.p)+"]")}}let r=t.s.slice(i,t.p);return st(t,r,2,n,i)}function Uu(t,e,s){let i=t.p;if(!K(e)||!K(t.s.charCodeAt(++t.p)))return zt(t,--t.p,e,0,s);if(t.s.charCodeAt(t.p+=4)===58&&(t.p+=3),t.s.charCodeAt(t.p)===46)for(;K(t.s.charCodeAt(++t.p)););let n=t.s.slice(i,t.p);return st(t,n,4,!1,i)}function st(t,e,s,i,n,r){if(t.ld){let o=new tt(e,s,i);return o.isValid()||T.x("invalid date",t,n),o}try{switch(r&&(e+=r),s){case 1:return Temporal.ZonedDateTime.from(e);case 2:return Temporal.PlainDateTime.from(e);case 3:return Temporal.PlainDate.from(e);case 4:return Temporal.PlainTime.from(e)}}catch(o){T.x(o instanceof Error?o.message:""+o,t,n)}}function Ku(t){for(;t.p<t.s.length;t.p++){let e=t.s.charCodeAt(t.p);if(e===10)break;if(e===13&&t.s.charCodeAt(t.p+1)===10){t.p++;break}(e<32&&e!==9||e===127)&&T.x("control characters are not allowed in comments",t)}}function J(t,e,s){let i;for(;t.p<t.s.length;){for(;t.p<t.s.length&&((i=t.s.charCodeAt(t.p))===32||i===9||!e&&(i===10||i===13&&t.s.charCodeAt(t.p+1)===10));)t.p++;if(s||i!==35)break;Ku(t)}}function Xt(t,e=61){let s,i=0,n=[],r,o=t.s.charCodeAt(s=t.p);do{if(o===e)return i||T.x("unexpected end of key",t),i===1&&n.push(t.s.slice(r,t.p)),t.p++,n;o===46?(i||T.x("illegal empty bare key",t),i===1&&n.push(t.s.slice(r,t.p)),i=0):!i&&(o===34||o===39)?(o===t.s.charCodeAt(t.p+1)&&o===t.s.charCodeAt(t.p+2)&&T.x("illegal quoted key: multiline strings are not allowed",t),n.push(Wt(t)),i=2,t.p--):o===32||o===9?i===1&&(n.push(t.s.slice(r,t.p)),i=2):i===2||o<48&&o!==45||o>57&&o<65||o>90&&o<97&&o!==95||o>122?T.x("illegal character in key",t):i||(i=1,r=t.p)}while(o=t.s.charCodeAt(++t.p));T.x("incomplete key-value: cannot find end of key",t,s)}function uo(t){let e=t.p++,s=Object.create(null),i=new Set,n;for(;t.p<t.s.length;){if(J(t),(n=t.s.charCodeAt(t.p))===125)return t.p++,s;let r,o=s,a=!1,l=t.p,c=Xt(t);for(let f=0;f<c.length;f++){f&&(o=a?o[r]:o[r]=Object.create(null)),r=c[f],(a=Object.hasOwn(o,r))&&(typeof o[r]!="object"||i.has(o[r]))&&T.x("trying to redefine an already defined value",t,l);let d=r==="__proto__";if(t.uk&&(d||r==="constructor")){o=t.uk!==1&&T.x("document contains an unsafe property",t,l);break}!a&&d&&Object.defineProperty(o,r,{enumerable:!0,configurable:!0,writable:!0})}a&&T.x("trying to redefine an already defined value",t,l),J(t,!0,!0);let u=it(t,125);if(o&&typeof(o[r]=u)=="object"&&i.add(u),J(t),(n=t.s.charCodeAt(t.p++))===125)return s;n!==44&&T.x("expected comma or end of structure",t,t.p-1)}T.x("unfinished table",t,e)}function fo(t){let e=t.p++,s=[],i;for(;t.p<t.s.length;){if(J(t),(i=t.s.charCodeAt(t.p))===93)return t.p++,s;if(s.push(it(t,93)),J(t),(i=t.s.charCodeAt(t.p++))===93)return s;i!==44&&T.x("expected comma or end of structure",t,t.p-1)}T.x("unfinished array",t,e)}function ho(t,e,s,i,n){let r=s,o=i,a,l=!1,c;for(let u=0;u<e.length;u++){if(u){if(r=l?r[a]:r[a]=Object.create(null),o=(c=o[a]).c,n===0&&(c.t===1||c.t===2))return null;if(c.t===2){let f=r.length-1;r=r[f],o=o[f].c}}if(a=e[u],(l=Object.hasOwn(r,a))&&o[a]?.t===0&&o[a]?.d)return null;if(!l){let f=a==="__proto__";if(t.uk&&(f||a==="constructor"))return!1;f&&(Object.defineProperty(r,a,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(o,a,{enumerable:!0,configurable:!0,writable:!0})),o[a]={t:u<e.length-1&&n===2?3:n,d:!1,i:0,c:Object.create(null)}}}if(c=o[a],c.t!==n&&!(n===1&&c.t===3)||(n===2&&(c.d||(c.d=!0,r[a]=[]),r[a].push(r=Object.create(null)),c.c[c.i++]=c={t:1,d:!1,i:0,c:Object.create(null)}),c.d))return null;if(c.d=!0,n===1)r=l?r[a]:r[a]=Object.create(null);else if(n===0&&l)return null;return[a,r,c.c]}function po(t,e,s){(e===null||t.uk===2)&&T.x(e===null?"trying to redefine an already defined table or value":"document contains an unsafe property",t,s)}function Qt(t,e={}){let s={s:t,p:0,d:e.maxDepth??1e3,bi:e.integersAsBigInt??!1,ld:e.useLegacyDate??!0,uk:e.unsafeKeyBehaviour==="throw"?2:e.unsafeKeyBehaviour==="drop"?1:0},i=Object.create(null),n=Object.create(null),r,o=!1,a=i,l=n;for(t.charCodeAt(0)===65279&&s.p++,J(s);s.p<t.length;){if(t.charCodeAt(s.p)===91){let c=t.charCodeAt(++s.p)===91;r=s.p+=+c,o=!1;let u=Xt(s,93);c&&(t.charCodeAt(s.p)!==93&&T.x("expected end of table array declaration",s),s.p++);let f=ho(s,u,i,n,c?2:1);f?(l=f[2],a=f[1]):(po(s,f,r),o=!0)}else{r=s.p;let c=Xt(s),u=ho(s,c,a,l,0);!u&&!o&&po(s,u,r),J(s,!0,!0);let f=it(s,void 0);u&&!o&&(u[1][u[0]]=f)}J(s,!0),s.p<t.length&&(r=t.charCodeAt(s.p))!==10&&(r!==13||t.charCodeAt(s.p+1)!==10)&&T.x("each key-value declaration must be followed by an end-of-line",s),J(s)}return i}var Yu=/^[a-z0-9-_]+$/i,mo=!!"".isWellFormed;function nt(t){let e=typeof t;if(e==="object"){if(Array.isArray(t))return"array";if(typeof t.getUTCDate=="function"&&t instanceof Date)return"date";if(globalThis.Temporal){if(t.until){if(t instanceof Temporal.ZonedDateTime)return"temporal/tz+uc";if(t instanceof Temporal.PlainDateTime||t instanceof Temporal.PlainDate)return"temporal/uc";if(t instanceof Temporal.PlainTime||t instanceof Temporal.Instant)return"temporal";if(t instanceof Temporal.PlainYearMonth)return"temporal/x"}else if(t.toPlainDate&&t instanceof Temporal.PlainMonthDay||t.negated&&t instanceof Temporal.Duration)return"temporal/x"}}return e}function Hu(t){for(let e=0;e<t.length;e++)if(nt(t[e])!=="object")return!1;return t.length!=0}function go(t){return JSON.stringify(t).replaceAll("\x7F","\\u007f")}function Gu(t){return go(mo?t.toWellFormed():t)}function yo(t){if(Yu.test(t))return t;if(mo&&!t.isWellFormed())throw new RangeError("key contains illegal lone surrogates");return go(t)}function qi(t,e,s,i,n){if(s===0)throw new Error("Could not stringify the object: maximum object depth exceeded");switch(e){case"number":if(isNaN(t))return"nan";if(t===1/0)return"inf";if(t===-1/0)return"-inf";if(Number.isInteger(t)&&(i||!Number.isSafeInteger(t)))return t.toFixed(1);case"bigint":case"boolean":case"temporal":return t.toString();case"string":return Gu(t);case"date":if(isNaN(t.getTime()))throw new TypeError("cannot serialize invalid date");return t.toISOString();case"object":return Ju(t,s,i,n);case"array":return Wu(t,s,i,n);case"temporal/tz+uc":if(n){let r=t.timeZoneId,o=r.charCodeAt(0);if(o!==43&&o!==45&&(o!==85&&o!==71&&o!==90&&o!==69||r!=="UTC"&&r!=="UCT"&&r!=="Universal"&&r!=="Zulu"&&!r.startsWith("GMT")&&r!=="Greenwich"&&!r.startsWith("Etc/")))throw new TypeError("Temporal objects with an IANA timezone are not allowed in Temporal strict mode")}case"temporal/uc":if(n&&t.calendarId!=="iso8601")throw new TypeError("Temporal objects with a non-default calendar are not allowed in Temporal strict mode");return t.toString({calendarName:"never",timeZoneName:"never"});case"temporal/x":throw new TypeError("Unsupported "+t[Symbol.toStringTag])}}function Ju(t,e,s,i){let n=Object.keys(t);if(n.length===0)return"{}";let r="{ ";for(let o=0;o<n.length;o++){let a=n[o];o&&(r+=", "),r+=yo(a)+" = "+qi(t[a],nt(t[a]),e-1,s,i)}return r+" }"}function Wu(t,e,s,i){if(t.length===0)return"[]";let n="[ ";for(let r=0;r<t.length;r++){if(r&&(n+=", "),t[r]===null||t[r]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=qi(t[r],nt(t[r]),e-1,s,i)}return n+" ]"}function zu(t,e,s,i,n){if(s===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="";for(let o=0;o<t.length;o++)r+=`${r&&`
|
|
154
|
+
`}[[${e}]]
|
|
155
|
+
`,r+=_i(0,t[o],e,s,i,n);return r}function _i(t,e,s,i,n,r){if(i===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let o="",a="",l=Object.keys(e);for(let c=0;c<l.length;c++){let u=l[c];if(e[u]!==null&&e[u]!==void 0){let f=nt(e[u]);if(f==="symbol"||f==="function")throw new TypeError(`cannot serialize values of type '${f}'`);let d=yo(u);if(f==="array"&&Hu(e[u]))a+=(a&&`
|
|
156
|
+
`)+zu(e[u],s?`${s}.${d}`:d,i-1,n,r);else if(f==="object"){let h=s?`${s}.${d}`:d;a+=(a&&`
|
|
157
|
+
`)+_i(h,e[u],h,i-1,n,r)}else o+=d,o+=" = ",o+=qi(e[u],f,i,n,r),o+=`
|
|
158
|
+
`}}return t&&(o||!a)&&(o=o?`[${t}]
|
|
159
|
+
${o}`:`[${t}]`),o&&a?`${o}
|
|
160
|
+
${a}`:o||a}function Pi(t,{maxDepth:e=1e3,numbersAsFloat:s=!1,strictTemporal:i=!1}={}){if(nt(t)!=="object")throw new TypeError("stringify can only be called with an object");let n=_i(0,t,"",e,s,i);return n[n.length-1]!==`
|
|
161
|
+
`?n+`
|
|
162
|
+
`:n}var Mt=Qs(oc(),1);var Cm=["yaml","xml","json","ini","csv","toml"],km=["yaml","json","xml","ini","csv","toml"];function yr(t){return typeof t=="string"&&Cm.includes(t)}function br(t){return typeof t=="string"&&km.includes(t)}var ac={inputFormat:"yaml",outputFormat:"yaml",raw:!1,compact:!1,prettyPrint:!1,indent:2,xmlAttributePrefix:"+@",xmlContentName:"+content",csvDelimiter:"",csvHeader:!0};function xm(t){let e=t.lastIndexOf("."),s=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e<=s+1?"":t.slice(e)}function lc(t){switch(xm(t).toLowerCase()){case".yaml":case".yml":return"yaml";case".json":return"json";case".xml":return"xml";case".ini":return"ini";case".csv":case".tsv":return"csv";case".toml":return"toml";default:return null}}function Om(t,e,s){return gr.default.parse(t,{delimiter:e||void 0,header:s,dynamicTyping:!0,skipEmptyLines:!0}).data}function Lm(t,e){return Array.isArray(t)||(t=[t]),gr.default.unparse(t,{delimiter:e||","})}function wr(t,e,s={}){let i=t.trim();if(!i)return null;let n=r=>ve(r,s);switch(e.inputFormat){case"yaml":return n(Mt.default.parse(i,{maxAliasCount:100}));case"json":return n(JSON.parse(i));case"xml":{let r=new qe({ignoreAttributes:!1,attributeNamePrefix:e.xmlAttributePrefix,textNodeName:e.xmlContentName,parseAttributeValue:!1,parseTagValue:!1,trimValues:!0,processEntities:!1,tagValueProcessor:(o,a)=>a===""?null:a});return n(r.parse(i))}case"ini":return n(Xs.parse(i));case"csv":return n(Om(i,e.csvDelimiter,e.csvHeader));case"toml":return n(Qt(i));default:{let r=e.inputFormat;throw new Error(`Invalid input format: ${r}`)}}}function cc(t,e={}){let s=e.maxElements??1e6,i=t.trim()?1:0,n=0;for(;n<t.length;){let l=t.indexOf(`
|
|
163
|
+
`,n),c=n+3,u=t[c];if(n>0&&t.startsWith("---",n)&&(u===void 0||u===`
|
|
164
|
+
`||u==="\r"||u===" "||u===" "||u==="#")&&(i++,i>s))throw new G(`query input document limit exceeded (${s})`,"array_elements");if(l===-1)break;n=l+1}let r=Mt.default.parseAllDocuments(t);if(r.length>s)throw new G(`query input document limit exceeded (${s})`,"array_elements");let o={used:r.length},a=[];for(let l of r)a.push(ve(l.toJS({maxAliasCount:100}),{...e,elementBudget:o}));return a}function uc(t,e={}){let s=t.trimStart();if(s.startsWith("---")){let i=s.slice(3).match(/\n---(\n|$)/);if(i&&i.index!==void 0){let n=s.slice(3,i.index+3),r=s.slice(i.index+3+i[0].length);return{frontMatter:ve(Mt.default.parse(n,{maxAliasCount:100}),e),content:r}}}if(s.startsWith("+++")){let i=s.slice(3).match(/\n\+\+\+(\n|$)/);if(i&&i.index!==void 0){let n=s.slice(3,i.index+3),r=s.slice(i.index+3+i[0].length);return{frontMatter:ve(Qt(n),e),content:r}}}if(s.startsWith("{{{")){let i=s.slice(3).match(/\n}}}(\n|$)/);if(i&&i.index!==void 0){let n=s.slice(3,i.index+3),r=s.slice(i.index+3+i[0].length);return{frontMatter:ve(JSON.parse(n),e),content:r}}}return null}function fc(t,e,s=Number.MAX_SAFE_INTEGER){if(t===void 0)return"";e.outputFormat!=="json"&&Im(t,e,s);let i;switch(e.outputFormat){case"yaml":i=Mt.default.stringify(t,{indent:e.indent}).trimEnd();break;case"json":return xr(t,s,{compact:e.compact,raw:e.raw,indent:e.indent});case"xml":{i=new ki({ignoreAttributes:!1,attributeNamePrefix:e.xmlAttributePrefix,textNodeName:e.xmlContentName,format:e.prettyPrint||!e.compact,indentBy:" ".repeat(e.indent)}).build(t);break}case"ini":{if(!t||typeof t!="object"||Array.isArray(t)){i="";break}i=Xs.stringify(t);break}case"csv":i=Lm(t,e.csvDelimiter);break;case"toml":{if(!t||typeof t!="object"||Array.isArray(t)){i="";break}i=Pi(t);break}default:throw new Error(`Unknown output format: ${e.outputFormat}`)}return new Ft(s,"yq output",()=>new G(`output size limit exceeded (${s} bytes)`,"output_size")).append(i).build()}function Im(t,e,s){let i=e.outputFormat==="yaml"||e.outputFormat==="toml"?6:2,n=new WeakSet,r=[{kind:"value",value:t,depth:0,labelBytes:0}],o=0,a=l=>{if(!Number.isSafeInteger(l)||l<0||l>s-o)throw new G(`output size limit exceeded (${s} bytes)`,"output_size");o+=l};for(;r.length>0;){let l=r.pop();if(!l)break;if(l.kind==="exit"){n.delete(l.value);continue}let{value:c,depth:u,labelBytes:f}=l;if(typeof c=="string"){a(f+u*e.indent),a(Ke(c)*(u===0?1:i));continue}if(c===null||typeof c!="object"){a(f+u*e.indent+Ke(String(c)));continue}if(a(32+f+u*e.indent),c instanceof Date){a(Ke(c.toISOString())*i);continue}if(n.has(c))throw new Error("cyclic value cannot be formatted");if(n.add(c),r.push({kind:"exit",value:c}),Array.isArray(c)){for(let g=c.length-1;g>=0;g--)r.push({kind:"value",value:c[g],depth:u+1,labelBytes:f});continue}let d=c,h=Object.keys(d);for(let g=h.length-1;g>=0;g--){let p=h[g],m=Ke(p);a(m*i),r.push({kind:"value",value:d[p],depth:u+1,labelBytes:m})}}}var qm={name:"yq",summary:"command-line YAML/XML/INI/CSV/TOML processor",usage:"yq [OPTIONS] [FILTER] [FILE]",description:`yq uses jq-style expressions to query and transform data in various formats.
|
|
165
|
+
Supports YAML, JSON, XML, INI, CSV, and TOML with automatic format conversion.
|
|
166
|
+
|
|
167
|
+
EXAMPLES:
|
|
168
|
+
# Extract a value from YAML
|
|
169
|
+
yq '.name' config.yaml
|
|
170
|
+
yq '.users[0].email' data.yaml
|
|
171
|
+
|
|
172
|
+
# Filter arrays
|
|
173
|
+
yq '.items[] | select(.active == true)' data.yaml
|
|
174
|
+
yq '[.users[] | select(.age > 30)]' users.yaml
|
|
175
|
+
|
|
176
|
+
# Transform data
|
|
177
|
+
yq '.users | map({name, email})' data.yaml
|
|
178
|
+
yq '.items | sort_by(.price) | reverse' products.yaml
|
|
179
|
+
|
|
180
|
+
# Modify file in-place
|
|
181
|
+
yq -i '.version = "2.0"' config.yaml
|
|
182
|
+
|
|
183
|
+
# Read JSON, output YAML
|
|
184
|
+
yq -p json '.' config.json
|
|
185
|
+
|
|
186
|
+
# Read YAML, output JSON
|
|
187
|
+
yq -o json '.' config.yaml
|
|
188
|
+
yq -o json -c '.' config.yaml # compact JSON
|
|
189
|
+
|
|
190
|
+
# Parse TOML config files
|
|
191
|
+
yq '.package.name' Cargo.toml
|
|
192
|
+
yq -o json '.' pyproject.toml
|
|
193
|
+
|
|
194
|
+
# Parse XML (attributes use +@ prefix, text uses +content)
|
|
195
|
+
yq -p xml '.root.items.item[].name' data.xml
|
|
196
|
+
yq -p xml '.root.user["+@id"]' data.xml # XML attributes
|
|
197
|
+
|
|
198
|
+
# Parse INI config files
|
|
199
|
+
yq -p ini '.database.host' config.ini
|
|
200
|
+
yq -p ini '.server' config.ini -o json
|
|
201
|
+
|
|
202
|
+
# Parse CSV/TSV (auto-detects delimiter)
|
|
203
|
+
yq -p csv '.[0].name' data.csv
|
|
204
|
+
yq '.[0].name' data.tsv # auto-detected as CSV
|
|
205
|
+
yq -p csv '[.[] | select(.category == "A")]' data.csv
|
|
206
|
+
|
|
207
|
+
# Extract front-matter from markdown/content files
|
|
208
|
+
yq --front-matter '.title' post.md
|
|
209
|
+
|
|
210
|
+
# Convert between formats
|
|
211
|
+
yq -p json -o csv '.users' data.json # JSON to CSV
|
|
212
|
+
yq -p csv -o yaml '.' data.csv # CSV to YAML
|
|
213
|
+
yq -p ini -o json '.' config.ini # INI to JSON
|
|
214
|
+
yq -p xml -o json '.' data.xml # XML to JSON
|
|
215
|
+
yq -o toml '.' config.yaml # YAML to TOML
|
|
216
|
+
|
|
217
|
+
# Common jq functions work in yq:
|
|
218
|
+
yq 'keys' data.yaml # get object keys
|
|
219
|
+
yq 'length' data.yaml # array/string length
|
|
220
|
+
yq '.items | first' data.yaml # first element
|
|
221
|
+
yq '.items | last' data.yaml # last element
|
|
222
|
+
yq '.nums | add' data.yaml # sum numbers
|
|
223
|
+
yq '.nums | min' data.yaml # minimum
|
|
224
|
+
yq '.nums | max' data.yaml # maximum
|
|
225
|
+
yq '.items | unique' data.yaml # unique values
|
|
226
|
+
yq '.items | group_by(.type)' data.yaml`,options:["-p, --input-format=FMT input format: yaml (default), xml, json, ini, csv, toml","-o, --output-format=FMT output format: yaml (default), json, xml, ini, csv, toml","-i, --inplace modify file in-place","-r, --raw-output output strings without quotes (json only)","-c, --compact compact output (json only)","-e, --exit-status set exit status based on output","-s, --slurp read entire input into array","-n, --null-input don't read any input","-j, --join-output don't print newlines after each output","-f, --front-matter extract and process front-matter only","-P, --prettyPrint pretty print output","-I, --indent=N set indent level (default: 2)"," --xml-attribute-prefix=STR XML attribute prefix (default: +@)"," --xml-content-name=STR XML text content name (default: +content)"," --csv-delimiter=CHAR CSV delimiter (default: auto-detect)"," --csv-header CSV has header row (default: true)"," --help display this help and exit"]};function dc(t){if(t===void 0||!/^\d+$/.test(t))return null;let e=Number(t);return!Number.isSafeInteger(e)||e<0||e>32?null:e}function hc(t){return{stdout:"",stderr:`yq: invalid indent '${t??""}' (expected integer 0..32)
|
|
227
|
+
`,exitCode:2}}function _m(t){let e={...ac,exitStatus:!1,slurp:!1,nullInput:!1,joinOutput:!1,inplace:!1,frontMatter:!1},s=!1,i=".",n=!1,r=[];for(let o=0;o<t.length;o++){let a=t[o];if(a.startsWith("--input-format=")){let l=a.slice(15);if(!yr(l))return pe("yq",`--input-format=${l}`);e.inputFormat=l,s=!0}else if(a.startsWith("--output-format=")){let l=a.slice(16);if(!br(l))return pe("yq",`--output-format=${l}`);e.outputFormat=l}else if(a.startsWith("--indent=")){let l=a.slice(9),c=dc(l);if(c===null)return hc(l);e.indent=c}else if(a.startsWith("--xml-attribute-prefix="))e.xmlAttributePrefix=a.slice(23);else if(a.startsWith("--xml-content-name="))e.xmlContentName=a.slice(19);else if(a.startsWith("--csv-delimiter="))e.csvDelimiter=a.slice(16);else if(a==="--csv-header")e.csvHeader=!0;else if(a==="--no-csv-header")e.csvHeader=!1;else if(a==="-p"||a==="--input-format"){let l=t[++o];if(!yr(l))return pe("yq",`${a} ${l}`);e.inputFormat=l,s=!0}else if(a==="-o"||a==="--output-format"){let l=t[++o];if(!br(l))return pe("yq",`${a} ${l}`);e.outputFormat=l}else if(a==="-I"||a==="--indent"){let l=t[++o],c=dc(l);if(c===null)return hc(l);e.indent=c}else if(a==="-r"||a==="--raw-output")e.raw=!0;else if(a==="-c"||a==="--compact")e.compact=!0;else if(a==="-e"||a==="--exit-status")e.exitStatus=!0;else if(a==="-s"||a==="--slurp")e.slurp=!0;else if(a==="-n"||a==="--null-input")e.nullInput=!0;else if(a==="-j"||a==="--join-output")e.joinOutput=!0;else if(a==="-i"||a==="--inplace")e.inplace=!0;else if(a==="-f"||a==="--front-matter")e.frontMatter=!0;else if(a==="-P"||a==="--prettyPrint")e.prettyPrint=!0;else if(a==="-")r.push("-");else{if(a.startsWith("--"))return pe("yq",a);if(a.startsWith("-"))for(let l of a.slice(1))if(l==="r")e.raw=!0;else if(l==="c")e.compact=!0;else if(l==="e")e.exitStatus=!0;else if(l==="s")e.slurp=!0;else if(l==="n")e.nullInput=!0;else if(l==="j")e.joinOutput=!0;else if(l==="i")e.inplace=!0;else if(l==="f")e.frontMatter=!0;else if(l==="P")e.prettyPrint=!0;else return pe("yq",`-${l}`);else n?r.push(a):(i=a,n=!0)}}return{options:e,filter:i,files:r,inputFormatExplicit:s}}var _b={name:"yq",async execute(t,e){vr(e.requireDefenseContext,"yq","execution entry");let s=(u,f)=>Tr(e.requireDefenseContext,"yq",u,f);if(Er(t))return Ar(qm);let i=_m(t);if("exitCode"in i)return i;let{options:n,filter:r,files:o,inputFormatExplicit:a}=i;if(!a&&o.length>0&&o[0]!=="-"){let u=lc(o[0]);u&&(n.inputFormat=u)}if(n.inplace&&(o.length===0||o[0]==="-"))return{stdout:"",stderr:`yq: -i/--inplace requires a file argument
|
|
228
|
+
`,exitCode:1};let l,c;if(n.nullInput)l="";else if(o.length===0||o.length===1&&o[0]==="-")l=Nr(e.stdin);else try{let u=e.fs.resolvePath(e.cwd,o[0]);c=u,l=await s("file read",()=>e.fs.readFile(u))}catch(u){if(u instanceof Zs)throw u;return{stdout:"",stderr:`yq: ${o[0]}: No such file or directory
|
|
229
|
+
`,exitCode:2}}try{let u=kr(r,{maxDepth:e.limits.maxQueryDepth,maxTokens:e.limits.maxQueryTokens,maxSourceLength:e.limits.maxStringLength}),f,d={limits:e.limits?{maxIterations:e.limits.maxJqIterations,maxStringLength:e.limits.maxStringLength,maxOutputSize:e.limits.maxOutputSize,maxArrayElements:e.limits.maxQueryElements,maxDepth:e.limits.maxQueryDepth}:void 0,env:e.env,coverage:e.coverage,requireDefenseContext:e.requireDefenseContext,budget:{operations:0,callDepth:0}},h={maxDepth:e.limits.maxQueryDepth,maxElements:e.limits.maxQueryElements};if(n.nullInput)f=Ye(null,u,d);else if(n.frontMatter){let S=uc(l,h);if(!S)return{stdout:"",stderr:`yq: no front-matter found
|
|
230
|
+
`,exitCode:1};f=Ye(S.frontMatter,u,d)}else if(n.slurp){let S;n.inputFormat==="yaml"?S=cc(l,h):S=[wr(l,n,h)],f=Ye(S,u,d)}else{let S=wr(l,n,h);f=Ye(S,u,d)}let g=Math.min(e.limits.maxStringLength,e.limits.maxOutputSize),p=n.joinOutput?"":`
|
|
231
|
+
`,m=new Ft(g,"yq output",()=>new G(`output size limit exceeded (${g} bytes)`,"output_size")),b=0;for(let S of f){if(Cr(S,e.limits.maxQueryDepth+1)>e.limits.maxQueryDepth)throw new G(`query depth limit exceeded (${e.limits.maxQueryDepth})`,"recursion");let v=b>0?p.length:0,E=n.joinOutput?0:1,C=m.remainingBytes-v-E;if(C<0)throw new G(`output size limit exceeded (${g} bytes)`,"output_size");let N=Math.min(C,e.executionScope?.remainingLiveBytes??C),O=e.executionScope?.reserveBytes("yq serialization",N,"yq output"),Y;try{Y=fc(S,n,N)}finally{O?.release()}Y!==""&&(b>0&&m.append(p),m.append(Y),b++)}b>0&&!n.joinOutput&&m.append(`
|
|
232
|
+
`);let y=m.build();if(n.inplace&&c)return await s("in-place write",()=>e.fs.writeFile(c,y)),{stdout:"",stderr:"",exitCode:0};let A=n.exitStatus&&(f.length===0||f.every(S=>S==null||S===!1))?1:0;return{stdout:y,stderr:"",exitCode:A}}catch(u){if(u instanceof Zs)throw u;if(u instanceof G)return{stdout:"",stderr:`yq: ${ei(u.message)}
|
|
233
|
+
`,exitCode:G.EXIT_CODE};let f=ei(u.message);return f.includes("Unknown function")?{stdout:"",stderr:`yq: error: ${f}
|
|
234
|
+
`,exitCode:3}:{stdout:"",stderr:`yq: parse error: ${f}
|
|
235
|
+
`,exitCode:5}}}},Pb={name:"yq",flags:[{flag:"-r",type:"boolean"},{flag:"-c",type:"boolean"},{flag:"-s",type:"boolean"},{flag:"-i",type:"value",valueHint:"string"},{flag:"-o",type:"value",valueHint:"string"}],stdinType:"text",needsArgs:!0};export{_b as a,Pb as b};
|
|
236
|
+
/*! Bundled license information:
|
|
237
|
+
|
|
238
|
+
smol-toml/dist/error.js:
|
|
239
|
+
smol-toml/dist/primitive.js:
|
|
240
|
+
smol-toml/dist/date.js:
|
|
241
|
+
smol-toml/dist/extract.js:
|
|
242
|
+
smol-toml/dist/util.js:
|
|
243
|
+
smol-toml/dist/struct.js:
|
|
244
|
+
smol-toml/dist/parse.js:
|
|
245
|
+
smol-toml/dist/stringify.js:
|
|
246
|
+
smol-toml/dist/index.js:
|
|
247
|
+
(*!
|
|
248
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
249
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
250
|
+
*
|
|
251
|
+
* Redistribution and use in source and binary forms, with or without
|
|
252
|
+
* modification, are permitted provided that the following conditions are met:
|
|
253
|
+
*
|
|
254
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
255
|
+
* list of conditions and the following disclaimer.
|
|
256
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
257
|
+
* this list of conditions and the following disclaimer in the
|
|
258
|
+
* documentation and/or other materials provided with the distribution.
|
|
259
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
260
|
+
* may be used to endorse or promote products derived from this software without
|
|
261
|
+
* specific prior written permission.
|
|
262
|
+
*
|
|
263
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
264
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
265
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
266
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
267
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
268
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
269
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
270
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
271
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
272
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
273
|
+
*)
|
|
274
|
+
*/
|