@jerryan/just-bash 3.9.0 → 3.11.0
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 +104 -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/builtin-manifest-ORBIZM7I.js +3 -0
- package/dist/bin/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
- package/dist/bin/{shell/chunks/chmod-GX5SYTRL.js → chunks/chmod-V5F4BXZ2.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-V4S4A7M6.js → chunks/chunk-2TEF4USR.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-GBKR5KTT.js → chunks/chunk-3ASHUC7C.js} +13 -13
- package/dist/bin/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
- package/dist/bin/chunks/chunk-4NYJ4ZTO.js +17 -0
- package/dist/bin/chunks/{chunk-M3Z5NZXT.js → 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/{shell/chunks/chunk-QFOXSCOD.js → chunks/chunk-726WDFMQ.js} +1 -1
- package/dist/bin/chunks/{chunk-DRPHNXG7.js → chunk-7LGT4LHQ.js} +1 -1
- package/dist/bin/chunks/{chunk-MBREBDZQ.js → chunk-AIWBN36Z.js} +1 -1
- package/dist/bin/chunks/{chunk-3ROYEBJI.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-AQKIHX3Q.js +3 -0
- 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-T6OIISUC.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-KMYJMEON.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/{shell/chunks/chunk-E54Z6VIE.js → chunks/chunk-ERYPQAZE.js} +5 -5
- package/dist/bin/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
- package/dist/bin/chunks/chunk-HFVQCXYX.js +10 -0
- package/dist/bin/chunks/chunk-HSWCKN2X.js +14 -0
- 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-6JEDM6CZ.js → chunk-KH6YLKPE.js} +1 -1
- package/dist/bin/chunks/chunk-KXSDVBJA.js +12 -0
- package/dist/bin/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
- package/dist/bin/chunks/{chunk-L345YZ6R.js → chunk-LVT5R45K.js} +1 -1
- package/dist/bin/chunks/{chunk-PTUQEN6I.js → chunk-M345X45Z.js} +7 -7
- package/dist/bin/chunks/{chunk-6FGMEZZP.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/{shell/chunks/chunk-ABP4OLJV.js → chunks/chunk-OXEDIWNZ.js} +1 -1
- 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/chunks/{chunk-O2BCKSMK.js → 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/chunks/chunk-UBA7DOWE.js +3 -0
- package/dist/bin/chunks/{chunk-VPSBWWXM.js → chunk-UFAYH3WW.js} +7 -6
- package/dist/bin/chunks/chunk-UPUFWGHR.js +3 -0
- package/dist/bin/{shell/chunks/chunk-QJWFCA7P.js → chunks/chunk-UU42WPB7.js} +1 -1
- package/dist/bin/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
- package/dist/bin/chunks/chunk-VMVXACZ5.js +6 -0
- package/dist/bin/chunks/chunk-WLQ2KWS3.js +10 -0
- 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-YLP7ULVT.js → cp-XJWV46T5.js} +1 -1
- package/dist/bin/{shell/chunks/curl-NHNZ46BU.js → chunks/curl-HZ5SBTVY.js} +11 -11
- package/dist/bin/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
- package/dist/bin/{shell/chunks/diff-DM47S5PT.js → chunks/diff-YLVT27CZ.js} +1 -1
- package/dist/bin/chunks/dist-4NZ74CRE.js +141 -0
- package/dist/bin/chunks/{du-DH76GZJ3.js → du-YNAJTGCR.js} +1 -1
- 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-3QDGII35.js +3 -0
- package/dist/bin/chunks/flag-coverage-AGEO3F6X.js +3 -0
- package/dist/bin/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
- package/dist/bin/chunks/{gzip-UQZL4R74.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-ZAAIZQWI.js → js-exec-LISDW7YC.js} +2 -2
- package/dist/bin/chunks/js-exec-worker.js +1 -0
- package/dist/bin/chunks/{ls-5Z45FV4U.js → 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/{shell/chunks/mv-EOOP2TO3.js → chunks/mv-35V6IA5V.js} +1 -1
- package/dist/bin/{shell/chunks/od-2GXD4D5K.js → chunks/od-TD5LZDUM.js} +1 -1
- package/dist/bin/{shell/chunks/paste-DWWA3JTW.js → chunks/paste-QJG6BYAP.js} +1 -1
- package/dist/bin/chunks/{python3-TJ6DCPIA.js → python3-P6MZ44HK.js} +5 -5
- package/dist/bin/{shell/chunks/readlink-EJ3IKLWW.js → chunks/readlink-BF435HNQ.js} +1 -1
- package/dist/bin/chunks/rg-B2DVJQVY.js +3 -0
- package/dist/bin/chunks/rm-HCMKNRM2.js +3 -0
- package/dist/bin/{shell/chunks/rmdir-PRNISPBA.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/chunks/{sleep-MOJQBZMY.js → sleep-4O22Z4DI.js} +1 -1
- package/dist/bin/{shell/chunks/split-HIFKSV2A.js → chunks/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/{which-4TPGVSBZ.js → which-G7X54RZL.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 +299 -293
- 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/builtin-manifest-ORBIZM7I.js +3 -0
- package/dist/bin/shell/chunks/{cat-BQ7FQTN5.js → cat-UJLF2DU2.js} +1 -1
- package/dist/bin/{chunks/chmod-GX5SYTRL.js → shell/chunks/chmod-V5F4BXZ2.js} +1 -1
- package/dist/bin/{chunks/chunk-V4S4A7M6.js → shell/chunks/chunk-2TEF4USR.js} +1 -1
- package/dist/bin/{chunks/chunk-GBKR5KTT.js → shell/chunks/chunk-3ASHUC7C.js} +13 -13
- package/dist/bin/shell/chunks/{chunk-N26Y42L6.js → chunk-3M5OMKFS.js} +1 -1
- package/dist/bin/shell/chunks/chunk-4NYJ4ZTO.js +17 -0
- package/dist/bin/shell/chunks/{chunk-M3Z5NZXT.js → 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/{chunks/chunk-QFOXSCOD.js → shell/chunks/chunk-726WDFMQ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-DRPHNXG7.js → chunk-7LGT4LHQ.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-MBREBDZQ.js → chunk-AIWBN36Z.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-3ROYEBJI.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-AQKIHX3Q.js +3 -0
- 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-T6OIISUC.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-KMYJMEON.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/{chunks/chunk-E54Z6VIE.js → shell/chunks/chunk-ERYPQAZE.js} +5 -5
- package/dist/bin/shell/chunks/{chunk-PQ2INDRF.js → chunk-GB3KUAFV.js} +1 -1
- package/dist/bin/shell/chunks/chunk-HFVQCXYX.js +10 -0
- package/dist/bin/shell/chunks/chunk-HSWCKN2X.js +14 -0
- 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-6JEDM6CZ.js → chunk-KH6YLKPE.js} +1 -1
- package/dist/bin/shell/chunks/chunk-KXSDVBJA.js +12 -0
- package/dist/bin/shell/chunks/{chunk-DYIBFLS3.js → chunk-LOU52GPJ.js} +2 -2
- package/dist/bin/shell/chunks/{chunk-L345YZ6R.js → chunk-LVT5R45K.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-PTUQEN6I.js → chunk-M345X45Z.js} +7 -7
- package/dist/bin/shell/chunks/{chunk-6FGMEZZP.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/{chunks/chunk-ABP4OLJV.js → shell/chunks/chunk-OXEDIWNZ.js} +1 -1
- 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/shell/chunks/{chunk-O2BCKSMK.js → 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/shell/chunks/chunk-UBA7DOWE.js +3 -0
- package/dist/bin/shell/chunks/{chunk-VPSBWWXM.js → chunk-UFAYH3WW.js} +7 -6
- package/dist/bin/shell/chunks/chunk-UPUFWGHR.js +3 -0
- package/dist/bin/{chunks/chunk-QJWFCA7P.js → shell/chunks/chunk-UU42WPB7.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-CNVNOT67.js → chunk-UW4E5XU5.js} +1 -1
- package/dist/bin/shell/chunks/chunk-VMVXACZ5.js +6 -0
- package/dist/bin/shell/chunks/chunk-WLQ2KWS3.js +10 -0
- 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-YLP7ULVT.js → cp-XJWV46T5.js} +1 -1
- package/dist/bin/{chunks/curl-NHNZ46BU.js → shell/chunks/curl-HZ5SBTVY.js} +11 -11
- package/dist/bin/shell/chunks/{cut-42X6363P.js → cut-LNJEMWBJ.js} +1 -1
- package/dist/bin/{chunks/diff-DM47S5PT.js → shell/chunks/diff-YLVT27CZ.js} +1 -1
- package/dist/bin/shell/chunks/dist-4NZ74CRE.js +141 -0
- package/dist/bin/shell/chunks/{du-DH76GZJ3.js → du-YNAJTGCR.js} +1 -1
- 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-3QDGII35.js +3 -0
- package/dist/bin/shell/chunks/flag-coverage-AGEO3F6X.js +3 -0
- package/dist/bin/shell/chunks/{grep-VXWNMIDD.js → grep-AZJ2CMYE.js} +1 -1
- package/dist/bin/shell/chunks/{gzip-UQZL4R74.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-ZAAIZQWI.js → js-exec-LISDW7YC.js} +2 -2
- package/dist/bin/shell/chunks/{ls-5Z45FV4U.js → 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/{chunks/mv-EOOP2TO3.js → shell/chunks/mv-35V6IA5V.js} +1 -1
- package/dist/bin/{chunks/od-2GXD4D5K.js → shell/chunks/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-TJ6DCPIA.js → python3-P6MZ44HK.js} +5 -5
- package/dist/bin/{chunks/readlink-EJ3IKLWW.js → shell/chunks/readlink-BF435HNQ.js} +1 -1
- package/dist/bin/shell/chunks/rg-B2DVJQVY.js +3 -0
- package/dist/bin/shell/chunks/rm-HCMKNRM2.js +3 -0
- package/dist/bin/{chunks/rmdir-PRNISPBA.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/shell/chunks/{sleep-MOJQBZMY.js → sleep-4O22Z4DI.js} +1 -1
- package/dist/bin/{chunks/split-HIFKSV2A.js → shell/chunks/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/{which-4TPGVSBZ.js → which-G7X54RZL.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 +369 -363
- package/dist/browser.d.ts +1 -1
- package/dist/bundle/browser.js +746 -726
- 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/builtin-manifest-7MJJDZ2T.js +2 -0
- package/dist/bundle/chunks/{cat-VZBWBIJB.js → cat-LG4YGKUE.js} +1 -1
- package/dist/bundle/chunks/{chmod-TEY5MD2W.js → chmod-XUKPG2M4.js} +1 -1
- package/dist/bundle/chunks/{chunk-E2F4A3CM.js → chunk-2A4OZBCS.js} +5 -5
- package/dist/bundle/chunks/{chunk-WNH3HOQA.js → chunk-353VO5TF.js} +1 -1
- package/dist/bundle/chunks/chunk-37UJACD6.js +9 -0
- package/dist/bundle/chunks/{chunk-H3A45X3W.js → chunk-3LGQ6XEC.js} +1 -1
- package/dist/bundle/chunks/{chunk-P57S6Z6R.js → chunk-3ZY5QX3G.js} +1 -1
- package/dist/bundle/chunks/{chunk-45QZRGYF.js → chunk-4VU4IF3W.js} +7 -6
- 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-6L6OYVLY.js +2 -0
- package/dist/bundle/chunks/{chunk-U57DSHID.js → chunk-6P2DITXT.js} +1 -1
- package/dist/bundle/chunks/chunk-74IR77AZ.js +11 -0
- 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-6HO6HX7V.js → chunk-AMXNXHXK.js} +1 -1
- package/dist/bundle/chunks/{chunk-QJ7OXJAZ.js → chunk-BLG7RWH4.js} +1 -1
- package/dist/bundle/chunks/chunk-BMBITA6Y.js +2 -0
- package/dist/bundle/chunks/{chunk-XQ2ZZFO6.js → chunk-BQTWRHZR.js} +2 -2
- package/dist/bundle/chunks/{chunk-WE7BJ7YU.js → chunk-BZ2OMW2T.js} +1 -1
- package/dist/bundle/chunks/{chunk-S6DNKKUL.js → chunk-CM4T4GB4.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-SE23TEGG.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-L7NEGEOJ.js +16 -0
- 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-6QAM55HM.js → chunk-NFODJFHN.js} +1 -1
- package/dist/bundle/chunks/{chunk-IXFQXNL4.js → chunk-NFW4YKDO.js} +1 -1
- package/dist/bundle/chunks/{chunk-HCKTU6IR.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-MWL2I5BV.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-VQEB6E2M.js +13 -0
- 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-XT7EK6BR.js +9 -0
- 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-FSKXIFYT.js → chunk-Y6UHNLT5.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-ZIQS5QAW.js +5 -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-UR762VVT.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/{diff-R7TXVVLN.js → diff-Z3XOLW44.js} +1 -1
- package/dist/bundle/chunks/{du-EQKH3UNA.js → du-YBSJVBXP.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-3AONTPPM.js +2 -0
- package/dist/bundle/chunks/flag-coverage-6YGO7STE.js +2 -0
- package/dist/bundle/chunks/{grep-Q2O5EIXQ.js → grep-WW5KJPUG.js} +1 -1
- package/dist/bundle/chunks/{gzip-KC5ENBD2.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-MUZRDUJ3.js → js-exec-T2WEE4KG.js} +2 -2
- package/dist/bundle/chunks/js-exec-worker.js +1 -0
- package/dist/bundle/chunks/{ls-WH5S4PPL.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-WE7DBLEK.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-W4UMQJAQ.js → python3-6JEP7ZZK.js} +5 -5
- package/dist/bundle/chunks/{readlink-JSRKXLLQ.js → readlink-7XGQ3PL7.js} +1 -1
- package/dist/bundle/chunks/rg-2OPJ5V3D.js +2 -0
- package/dist/bundle/chunks/rm-AZZM5DCE.js +2 -0
- package/dist/bundle/chunks/{rmdir-3WTXMVKI.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-HUKVGJTW.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/{which-UWVKETYW.js → which-BP5YY5BR.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 -1059
- package/dist/bundle/index.js +345 -339
- package/dist/commands/mktemp/mktemp.d.ts +4 -0
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/which/which.d.ts +10 -0
- package/dist/commands/yes/yes.d.ts +4 -0
- package/dist/custom-commands.d.ts +12 -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/path-utils.d.ts +0 -4
- 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/limits.d.ts +0 -3
- 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/dist/types.d.ts +6 -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-6JUPBMCR.js +0 -13
- package/dist/bin/chunks/chunk-BB5VTPMQ.js +0 -16
- package/dist/bin/chunks/chunk-CN4JKMTR.js +0 -8
- package/dist/bin/chunks/chunk-F2PYTUMR.js +0 -9
- package/dist/bin/chunks/chunk-HWI42GQO.js +0 -7
- package/dist/bin/chunks/chunk-HWK7KFGB.js +0 -3
- package/dist/bin/chunks/chunk-I57EACSL.js +0 -3
- package/dist/bin/chunks/chunk-ONF4KUYV.js +0 -13
- package/dist/bin/chunks/chunk-PRVPFKTC.js +0 -276
- package/dist/bin/chunks/chunk-RTN6X652.js +0 -11
- package/dist/bin/chunks/chunk-RVPTAYDS.js +0 -4
- package/dist/bin/chunks/chunk-U5JLGI56.js +0 -21
- package/dist/bin/chunks/dist-5MWO25Y4.js +0 -141
- package/dist/bin/chunks/find-MHC4QV6H.js +0 -3
- package/dist/bin/chunks/flag-coverage-LLAQBVIG.js +0 -3
- package/dist/bin/chunks/mkdir-YJ3SOVRP.js +0 -3
- package/dist/bin/chunks/rg-WHVR3YDT.js +0 -3
- package/dist/bin/chunks/rm-B4LVIG7A.js +0 -3
- package/dist/bin/chunks/sqlite3-CXQTZRPZ.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-6JUPBMCR.js +0 -13
- package/dist/bin/shell/chunks/chunk-BB5VTPMQ.js +0 -16
- package/dist/bin/shell/chunks/chunk-CN4JKMTR.js +0 -8
- package/dist/bin/shell/chunks/chunk-F2PYTUMR.js +0 -9
- package/dist/bin/shell/chunks/chunk-HWI42GQO.js +0 -7
- package/dist/bin/shell/chunks/chunk-HWK7KFGB.js +0 -3
- package/dist/bin/shell/chunks/chunk-I57EACSL.js +0 -3
- 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-RTN6X652.js +0 -11
- package/dist/bin/shell/chunks/chunk-RVPTAYDS.js +0 -4
- 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/find-MHC4QV6H.js +0 -3
- package/dist/bin/shell/chunks/flag-coverage-LLAQBVIG.js +0 -3
- package/dist/bin/shell/chunks/mkdir-YJ3SOVRP.js +0 -3
- package/dist/bin/shell/chunks/rg-WHVR3YDT.js +0 -3
- package/dist/bin/shell/chunks/rm-B4LVIG7A.js +0 -3
- package/dist/bin/shell/chunks/sqlite3-CXQTZRPZ.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-2SMD2AUA.js +0 -3
- package/dist/bundle/chunks/chunk-35MBA3VY.js +0 -12
- package/dist/bundle/chunks/chunk-3OBCZP7T.js +0 -12
- package/dist/bundle/chunks/chunk-4CC3OZPU.js +0 -2
- package/dist/bundle/chunks/chunk-A257L6QO.js +0 -7
- package/dist/bundle/chunks/chunk-ATGOUOX2.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-LRFR25IP.js +0 -8
- package/dist/bundle/chunks/chunk-RWQWFXMH.js +0 -10
- package/dist/bundle/chunks/chunk-Y6JBSHCM.js +0 -20
- package/dist/bundle/chunks/chunk-ZBUZKIPX.js +0 -6
- package/dist/bundle/chunks/find-RLKBCGJR.js +0 -2
- package/dist/bundle/chunks/flag-coverage-YQGACUSN.js +0 -2
- package/dist/bundle/chunks/mkdir-Z6MMWH3D.js +0 -2
- package/dist/bundle/chunks/rg-JKB7DR66.js +0 -2
- package/dist/bundle/chunks/rm-IGPLE632.js +0 -2
- package/dist/bundle/chunks/sqlite3-DQNCWDG5.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
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import{createRequire} from"node:module";const require=createRequire(import.meta.url);
|
|
2
|
-
import{a as uc}from"./chunk-6RK4AAB7.js";import{a as vr,b as Ke,c as Tr,d as Cr}from"./chunk-35MBA3VY.js";import{d as Ee}from"./chunk-UUIYAOD4.js";import{a as Ar,b as Er}from"./chunk-BKUWXPEM.js";import{a as zs}from"./chunk-ZBUZKIPX.js";import{d as Mt}from"./chunk-FTET43KM.js";import{l as G}from"./chunk-TVCZIH6M.js";import{a as Ue,d as wr}from"./chunk-GN6CQ3J4.js";import{a as Qs}from"./chunk-FOCWZZDE.js";import{a as Sr,b as Nr,c as he}from"./chunk-QAYAQNCG.js";import{a as Pt,b as w,c as Xs}from"./chunk-NCUTH6QL.js";var oo=w((Ay,ro)=>{var{hasOwnProperty:kn}=Object.prototype,xn=(s,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 t=e.platform==="win32"?`\r
|
|
3
|
-
`:`
|
|
4
|
-
`,n=e.whitespace?" = ":"=",i=[],r=e.sort?Object.keys(s).sort():Object.keys(s),o=0;e.align&&(o=ee(r.filter(c=>s[c]===null||Array.isArray(s[c])||typeof s[c]!="object").map(c=>Array.isArray(s[c])?`${c}[]`:c).concat([""]).reduce((c,u)=>ee(c).length>=ee(u).length?c:u)).length);let a="",l=e.bracketedArray?"[]":"";for(let c of r){let u=s[c];if(u&&Array.isArray(u))for(let f of u)a+=ee(`${c}${l}`).padEnd(o," ")+n+ee(f)+t;else u&&typeof u=="object"?i.push(c):a+=ee(c).padEnd(o," ")+n+ee(u)+t}e.section&&a.length&&(a="["+ee(e.section)+"]"+(e.newline?t+t:t)+a);for(let c of i){let u=no(c,".").join("\\."),f=(e.section?e.section+".":"")+u,d=xn(s[c],{...e,section:f});a.length&&d.length&&(a+=t),a+=d}return a};function no(s,e){var t=0,n=0,i=0,r=[];do if(i=s.indexOf(e,t),i!==-1){if(t=i+e.length,i>0&&s[i-1]==="\\")continue;r.push(s.slice(n,i)),n=i+e.length}while(i!==-1);return r.push(s.slice(n)),r}var so=(s,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),n=t,i=null,r=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,o=s.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(i=Gt(u[1]),i==="__proto__"){n=Object.create(null);continue}n=t[i]=t[i]||Object.create(null);continue}let f=Gt(u[2]),d;e.bracketedArray?d=f.length>2&&f.slice(-2)==="[]":(a[f]=(a?.[f]||0)+1,d=a[f]>1);let p=d&&f.endsWith("[]")?f.slice(0,-2):f;if(p==="__proto__")continue;let g=u[3]?Gt(u[4]):!0,h=g==="true"||g==="false"||g==="null"?JSON.parse(g):g;d&&(kn.call(n,p)?Array.isArray(n[p])||(n[p]=[n[p]]):n[p]=[]),Array.isArray(n[p])?n[p].push(h):n[p]=h}let l=[];for(let c of Object.keys(t)){if(!kn.call(t,c)||typeof t[c]!="object"||Array.isArray(t[c]))continue;let u=no(c,".");n=t;let f=u.pop(),d=f.replace(/\\\./g,".");for(let p of u)p!=="__proto__"&&((!kn.call(n,p)||typeof n[p]!="object")&&(n[p]=Object.create(null)),n=n[p]);n===t&&d===f||(n[d]=t[c],l.push(c))}for(let c of l)delete t[c];return t},io=s=>s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"),ee=s=>typeof s!="string"||s.match(/[=\r\n]/)||s.match(/^\[/)||s.length>1&&io(s)||s!==s.trim()?JSON.stringify(s):s.split(";").join("\\;").split("#").join("\\#"),Gt=s=>{if(s=(s||"").trim(),io(s)){s.charAt(0)==="'"&&(s=s.slice(1,-1));try{s=JSON.parse(s)}catch{}}else{let e=!1,t="";for(let n=0,i=s.length;n<i;n++){let r=s.charAt(n);if(e)"\\;#".indexOf(r)!==-1?t+=r:t+="\\"+r,e=!1;else{if(";#".indexOf(r)!==-1)break;r==="\\"?e=!0:t+=r}}return e&&(t+="\\"),t.trim()}return s};ro.exports={parse:so,decode:so,stringify:xn,encode:xn,safe:ee,unsafe:Gt}});var k=w(P=>{"use strict";var Pn=Symbol.for("yaml.alias"),po=Symbol.for("yaml.document"),zt=Symbol.for("yaml.map"),mo=Symbol.for("yaml.pair"),Mn=Symbol.for("yaml.scalar"),Qt=Symbol.for("yaml.seq"),te=Symbol.for("yaml.node.type"),Wu=s=>!!s&&typeof s=="object"&&s[te]===Pn,Xu=s=>!!s&&typeof s=="object"&&s[te]===po,zu=s=>!!s&&typeof s=="object"&&s[te]===zt,Qu=s=>!!s&&typeof s=="object"&&s[te]===mo,go=s=>!!s&&typeof s=="object"&&s[te]===Mn,Zu=s=>!!s&&typeof s=="object"&&s[te]===Qt;function yo(s){if(s&&typeof s=="object")switch(s[te]){case zt:case Qt:return!0}return!1}function ef(s){if(s&&typeof s=="object")switch(s[te]){case Pn:case zt:case Mn:case Qt:return!0}return!1}var tf=s=>(go(s)||yo(s))&&!!s.anchor;P.ALIAS=Pn;P.DOC=po;P.MAP=zt;P.NODE_TYPE=te;P.PAIR=mo;P.SCALAR=Mn;P.SEQ=Qt;P.hasAnchor=tf;P.isAlias=Wu;P.isCollection=yo;P.isDocument=Xu;P.isMap=zu;P.isNode=ef;P.isPair=Qu;P.isScalar=go;P.isSeq=Zu});var nt=w($n=>{"use strict";var q=k(),B=Symbol("break visit"),bo=Symbol("skip children"),Q=Symbol("remove node");function Zt(s,e){let t=wo(e);q.isDocument(s)?_e(null,s.contents,t,Object.freeze([s]))===Q&&(s.contents=null):_e(null,s,t,Object.freeze([]))}Zt.BREAK=B;Zt.SKIP=bo;Zt.REMOVE=Q;function _e(s,e,t,n){let i=So(s,e,t,n);if(q.isNode(i)||q.isPair(i))return No(s,n,i),_e(s,i,t,n);if(typeof i!="symbol"){if(q.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=_e(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===B)return B;o===Q&&(e.items.splice(r,1),r-=1)}}}else if(q.isPair(e)){n=Object.freeze(n.concat(e));let r=_e("key",e.key,t,n);if(r===B)return B;r===Q&&(e.key=null);let o=_e("value",e.value,t,n);if(o===B)return B;o===Q&&(e.value=null)}}return i}async function es(s,e){let t=wo(e);q.isDocument(s)?await qe(null,s.contents,t,Object.freeze([s]))===Q&&(s.contents=null):await qe(null,s,t,Object.freeze([]))}es.BREAK=B;es.SKIP=bo;es.REMOVE=Q;async function qe(s,e,t,n){let i=await So(s,e,t,n);if(q.isNode(i)||q.isPair(i))return No(s,n,i),qe(s,i,t,n);if(typeof i!="symbol"){if(q.isCollection(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){let o=await qe(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===B)return B;o===Q&&(e.items.splice(r,1),r-=1)}}}else if(q.isPair(e)){n=Object.freeze(n.concat(e));let r=await qe("key",e.key,t,n);if(r===B)return B;r===Q&&(e.key=null);let o=await qe("value",e.value,t,n);if(o===B)return B;o===Q&&(e.value=null)}}return i}function wo(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function So(s,e,t,n){if(typeof t=="function")return t(s,e,n);if(q.isMap(e))return t.Map?.(s,e,n);if(q.isSeq(e))return t.Seq?.(s,e,n);if(q.isPair(e))return t.Pair?.(s,e,n);if(q.isScalar(e))return t.Scalar?.(s,e,n);if(q.isAlias(e))return t.Alias?.(s,e,n)}function No(s,e,t){let n=e[e.length-1];if(q.isCollection(n))n.items[s]=t;else if(q.isPair(n))s==="key"?n.key=t:n.value=t;else if(q.isDocument(n))n.contents=t;else{let i=q.isAlias(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}$n.visit=Zt;$n.visitAsync=es});var Rn=w(Eo=>{"use strict";var Ao=k(),sf=nt(),nf={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},rf=s=>s.replace(/[!,[\]{}]/g,e=>nf[e]),it=class s{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},s.defaultYaml,e),this.tags=Object.assign({},s.defaultTags,t)}clone(){let e=new s(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){let e=new s(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:s.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},s.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:s.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},s.defaultTags),this.atNextDocument=!1);let n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;let[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{let o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){let o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}let[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);let r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+rf(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags),i;if(e&&n.length>0&&Ao.isNode(e.contents)){let r={};sf.visit(e.contents,(o,a)=>{Ao.isNode(a)&&a.tag&&(r[a.tag]=!0)}),i=Object.keys(r)}else i=[];for(let[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(a=>a.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
5
|
-
`)}};it.defaultYaml={explicit:!1,version:"1.2"};it.defaultTags={"!!":"tag:yaml.org,2002:"};Eo.Directives=it});var ts=w(rt=>{"use strict";var vo=k(),of=nt();function af(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function To(s){let e=new Set;return of.visit(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function Co(s,e){for(let t=1;;++t){let n=`${s}${t}`;if(!e.has(n))return n}}function lf(s,e){let t=[],n=new Map,i=null;return{onAnchor:r=>{t.push(r),i??(i=To(s));let o=Co(e,i);return i.add(o),o},setAnchors:()=>{for(let r of t){let o=n.get(r);if(typeof o=="object"&&o.anchor&&(vo.isScalar(o.node)||vo.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:n}}rt.anchorIsValid=af;rt.anchorNames=To;rt.createNodeAnchors=lf;rt.findNewAnchor=Co});var Fn=w(ko=>{"use strict";function ot(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){let o=n[i],a=ot(s,n,String(i),o);a===void 0?delete n[i]:a!==o&&(n[i]=a)}else if(n instanceof Map)for(let i of Array.from(n.keys())){let r=n.get(i),o=ot(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(let i of Array.from(n)){let r=ot(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(let[i,r]of Object.entries(n)){let o=ot(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}ko.applyReviver=ot});var ne=w(Oo=>{"use strict";var cf=k();function xo(s,e,t){if(Array.isArray(s))return s.map((n,i)=>xo(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!cf.hasAnchor(s))return s.toJSON(e,t);let n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};let i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!t?.keep?Number(s):s}Oo.toJS=xo});var ss=w(Io=>{"use strict";var uf=Fn(),Lo=k(),ff=ne(),jn=class{constructor(e){Object.defineProperty(this,Lo.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:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!Lo.isDocument(e))throw new TypeError("A document argument is required");let o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=ff.toJS(this,"",o);if(typeof i=="function")for(let{count:l,res:c}of o.anchors.values())i(c,l);return typeof r=="function"?uf.applyReviver(r,{"":a},"",a):a}};Io.NodeBase=jn});var at=w(_o=>{"use strict";var df=ts(),hf=nt(),Pe=k(),pf=ss(),mf=ne(),Bn=class extends pf.NodeBase{constructor(e){super(Pe.ALIAS),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],hf.visit(e,{Node:(r,o)=>{(Pe.isAlias(o)||Pe.hasAnchor(o))&&n.push(o)}}),t&&(t.aliasResolveCache=n));let i;for(let r of n){if(r===this)break;r.anchor===this.source&&(i=r)}return i}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i,t);if(!o){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=n.get(o);if(a||(mf.toJS(o,null,t),a=n.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=ns(i,o,n)),a.count*a.aliasCount>r)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return a.res}toString(e,t,n){let i=`*${this.source}`;if(e){if(df.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`${i} `}return i}};function ns(s,e,t){if(Pe.isAlias(e)){let n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(Pe.isCollection(e)){let n=0;for(let i of e.items){let r=ns(s,i,t);r>n&&(n=r)}return n}else if(Pe.isPair(e)){let n=ns(s,e.key,t),i=ns(s,e.value,t);return Math.max(n,i)}return 1}_o.Alias=Bn});var I=w(Dn=>{"use strict";var gf=k(),yf=ss(),bf=ne(),wf=s=>!s||typeof s!="function"&&typeof s!="object",ie=class extends yf.NodeBase{constructor(e){super(gf.SCALAR),this.value=e}toJSON(e,t){return t?.keep?this.value:bf.toJS(this.value,e,t)}toString(){return String(this.value)}};ie.BLOCK_FOLDED="BLOCK_FOLDED";ie.BLOCK_LITERAL="BLOCK_LITERAL";ie.PLAIN="PLAIN";ie.QUOTE_DOUBLE="QUOTE_DOUBLE";ie.QUOTE_SINGLE="QUOTE_SINGLE";Dn.Scalar=ie;Dn.isScalarValue=wf});var lt=w(Po=>{"use strict";var Sf=at(),ge=k(),qo=I(),Nf="tag:yaml.org,2002:";function Af(s,e,t){if(e){let n=t.filter(r=>r.tag===e),i=n.find(r=>!r.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>n.identify?.(s)&&!n.format)}function Ef(s,e,t){if(ge.isDocument(s)&&(s=s.contents),ge.isNode(s))return s;if(ge.isPair(s)){let f=t.schema[ge.MAP].createNode?.(t.schema,null,t);return f.items.push(s),f}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt<"u"&&s instanceof BigInt)&&(s=s.valueOf());let{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:a}=t,l;if(n&&s&&typeof s=="object"){if(l=a.get(s),l)return l.anchor??(l.anchor=i(s)),new Sf.Alias(l.anchor);l={anchor:null,node:null},a.set(s,l)}e?.startsWith("!!")&&(e=Nf+e.slice(2));let c=Af(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){let f=new qo.Scalar(s);return l&&(l.node=f),f}c=s instanceof Map?o[ge.MAP]:Symbol.iterator in Object(s)?o[ge.SEQ]:o[ge.MAP]}r&&(r(c),delete t.onTagObj);let u=c?.createNode?c.createNode(t.schema,s,t):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(t.schema,s,t):new qo.Scalar(s);return e?u.tag=e:c.default||(u.tag=c.tag),l&&(l.node=u),u}Po.createNode=Ef});var rs=w(is=>{"use strict";var vf=lt(),Z=k(),Tf=ss();function Vn(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){let r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){let o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return vf.createNode(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}var Mo=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done,Un=class extends Tf.NodeBase{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>Z.isNode(n)||Z.isPair(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Mo(e))this.add(t);else{let[n,...i]=e,r=this.get(n,!0);if(Z.isCollection(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,Vn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let i=this.get(t,!0);if(Z.isCollection(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&Z.isScalar(r)?r.value:r:Z.isCollection(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Z.isPair(t))return!1;let n=t.value;return n==null||e&&Z.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let i=this.get(t,!0);return Z.isCollection(i)?i.hasIn(n):!1}setIn(e,t){let[n,...i]=e;if(i.length===0)this.set(n,t);else{let r=this.get(n,!0);if(Z.isCollection(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,Vn(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}};is.Collection=Un;is.collectionFromPath=Vn;is.isEmptyPath=Mo});var ct=w(os=>{"use strict";var Cf=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Kn(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}var kf=(s,e,t)=>s.endsWith(`
|
|
6
|
-
`)?Kn(t,e):t.includes(`
|
|
7
|
-
`)?`
|
|
8
|
-
`+Kn(t,e):(s.endsWith(" ")?"":" ")+t;os.indentComment=Kn;os.lineComment=kf;os.stringifyComment=Cf});var Ro=w(ut=>{"use strict";var xf="flow",Yn="block",as="quoted";function Of(s,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:r=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return s;i<r&&(r=0);let l=Math.max(1+r,1+i-e.length);if(s.length<=l)return s;let c=[],u={},f=i-e.length;typeof n=="number"&&(n>i-Math.max(2,r)?c.push(0):f=i-n);let d,p,g=!1,h=-1,m=-1,b=-1;t===Yn&&(h=$o(s,h,e.length),h!==-1&&(f=h+l));for(let A;A=s[h+=1];){if(t===as&&A==="\\"){switch(m=h,s[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}b=h}if(A===`
|
|
9
|
-
`)t===Yn&&(h=$o(s,h,e.length)),f=h+e.length+l,d=void 0;else{if(A===" "&&p&&p!==" "&&p!==`
|
|
10
|
-
`&&p!==" "){let S=s[h+1];S&&S!==" "&&S!==`
|
|
11
|
-
`&&S!==" "&&(d=h)}if(h>=f)if(d)c.push(d),f=d+l,d=void 0;else if(t===as){for(;p===" "||p===" ";)p=A,A=s[h+=1],g=!0;let S=h>b+1?h-2:m-1;if(u[S])return s;c.push(S),u[S]=!0,f=S+l,d=void 0}else g=!0}p=A}if(g&&a&&a(),c.length===0)return s;o&&o();let y=s.slice(0,c[0]);for(let A=0;A<c.length;++A){let S=c[A],v=c[A+1]||s.length;S===0?y=`
|
|
12
|
-
${e}${s.slice(0,v)}`:(t===as&&u[S]&&(y+=`${s[S]}\\`),y+=`
|
|
13
|
-
${e}${s.slice(S+1,v)}`)}return y}function $o(s,e,t){let n=e,i=e+1,r=s[i];for(;r===" "||r===" ";)if(e<i+t)r=s[++e];else{do r=s[++e];while(r&&r!==`
|
|
14
|
-
`);n=e,i=e+1,r=s[i]}return n}ut.FOLD_BLOCK=Yn;ut.FOLD_FLOW=xf;ut.FOLD_QUOTED=as;ut.foldFlowLines=Of});var dt=w(Fo=>{"use strict";var H=I(),re=Ro(),cs=(s,e)=>({indentAtStart:e?s.indent.length:s.indentAtStart,lineWidth:s.options.lineWidth,minContentWidth:s.options.minContentWidth}),us=s=>/^(%|---|\.\.\.)/m.test(s);function Lf(s,e,t){if(!e||e<0)return!1;let n=e-t,i=s.length;if(i<=n)return!1;for(let r=0,o=0;r<i;++r)if(s[r]===`
|
|
15
|
-
`){if(r-o>n)return!0;if(o=r+1,i-o<=n)return!1}return!0}function ft(s,e){let t=JSON.stringify(s);if(e.options.doubleQuotedAsJSON)return t;let{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,r=e.indent||(us(s)?" ":""),o="",a=0;for(let l=0,c=t[l];c;c=t[++l])if(c===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(a,l)+"\\ ",l+=1,a=l,c="\\"),c==="\\")switch(t[l+1]){case"u":{o+=t.slice(a,l);let u=t.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+=t.substr(l,6)}l+=5,a=l+1}break;case"n":if(n||t[l+2]==='"'||t.length<i)l+=1;else{for(o+=t.slice(a,l)+`
|
|
16
|
-
|
|
17
|
-
`;t[l+2]==="\\"&&t[l+3]==="n"&&t[l+4]!=='"';)o+=`
|
|
18
|
-
`,l+=2;o+=r,t[l+2]===" "&&(o+="\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+t.slice(a):t,n?o:re.foldFlowLines(o,r,re.FOLD_QUOTED,cs(e,!1))}function Gn(s,e){if(e.options.singleQuote===!1||e.implicitKey&&s.includes(`
|
|
19
|
-
`)||/[ \t]\n|\n[ \t]/.test(s))return ft(s,e);let t=e.indent||(us(s)?" ":""),n="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
20
|
-
${t}`)+"'";return e.implicitKey?n:re.foldFlowLines(n,t,re.FOLD_FLOW,cs(e,!1))}function Me(s,e){let{singleQuote:t}=e.options,n;if(t===!1)n=ft;else{let i=s.includes('"'),r=s.includes("'");i&&!r?n=Gn:r&&!i?n=ft:n=t?Gn:ft}return n(s,e)}var Hn;try{Hn=new RegExp(`(^|(?<!
|
|
21
|
-
))
|
|
22
|
-
+(?!
|
|
23
|
-
|$)`,"g")}catch{Hn=/\n+(?!\n|$)/g}function ls({comment:s,type:e,value:t},n,i,r){let{blockQuote:o,commentString:a,lineWidth:l}=n.options;if(!o||/\n[\t ]+$/.test(t))return Me(t,n);let c=n.indent||(n.forceBlockIndent||us(t)?" ":""),u=o==="literal"?!0:o==="folded"||e===H.Scalar.BLOCK_FOLDED?!1:e===H.Scalar.BLOCK_LITERAL?!0:!Lf(t,l,c.length);if(!t)return u?`|
|
|
24
|
-
`:`>
|
|
25
|
-
`;let f,d;for(d=t.length;d>0;--d){let v=t[d-1];if(v!==`
|
|
26
|
-
`&&v!==" "&&v!==" ")break}let p=t.substring(d),g=p.indexOf(`
|
|
27
|
-
`);g===-1?f="-":t===p||g!==p.length-1?(f="+",r&&r()):f="",p&&(t=t.slice(0,-p.length),p[p.length-1]===`
|
|
28
|
-
`&&(p=p.slice(0,-1)),p=p.replace(Hn,`$&${c}`));let h=!1,m,b=-1;for(m=0;m<t.length;++m){let v=t[m];if(v===" ")h=!0;else if(v===`
|
|
29
|
-
`)b=m;else break}let y=t.substring(0,b<m?b+1:m);y&&(t=t.substring(y.length),y=y.replace(/\n+/g,`$&${c}`));let S=(h?c?"2":"1":"")+f;if(s&&(S+=" "+a(s.replace(/ ?[\r\n]+/g," ")),i&&i()),!u){let v=t.replace(/\n+/g,`
|
|
30
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),E=!1,C=cs(n,!0);o!=="folded"&&e!==H.Scalar.BLOCK_FOLDED&&(C.onOverflow=()=>{E=!0});let N=re.foldFlowLines(`${y}${v}${p}`,c,re.FOLD_BLOCK,C);if(!E)return`>${S}
|
|
31
|
-
${c}${N}`}return t=t.replace(/\n+/g,`$&${c}`),`|${S}
|
|
32
|
-
${c}${y}${t}${p}`}function If(s,e,t,n){let{type:i,value:r}=s,{actualString:o,implicitKey:a,indent:l,indentStep:c,inFlow:u}=e;if(a&&r.includes(`
|
|
33
|
-
`)||u&&/[[\]{},]/.test(r))return Me(r,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))return a||u||!r.includes(`
|
|
34
|
-
`)?Me(r,e):ls(s,e,t,n);if(!a&&!u&&i!==H.Scalar.PLAIN&&r.includes(`
|
|
35
|
-
`))return ls(s,e,t,n);if(us(r)){if(l==="")return e.forceBlockIndent=!0,ls(s,e,t,n);if(a&&l===c)return Me(r,e)}let f=r.replace(/\n+/g,`$&
|
|
36
|
-
${l}`);if(o){let d=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(f),{compat:p,tags:g}=e.doc.schema;if(g.some(d)||p?.some(d))return Me(r,e)}return a?f:re.foldFlowLines(f,l,re.FOLD_FLOW,cs(e,!1))}function _f(s,e,t,n){let{implicitKey:i,inFlow:r}=e,o=typeof s.value=="string"?s:Object.assign({},s,{value:String(s.value)}),{type:a}=s;a!==H.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(a=H.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case H.Scalar.BLOCK_FOLDED:case H.Scalar.BLOCK_LITERAL:return i||r?Me(o.value,e):ls(o,e,t,n);case H.Scalar.QUOTE_DOUBLE:return ft(o.value,e);case H.Scalar.QUOTE_SINGLE:return Gn(o.value,e);case H.Scalar.PLAIN:return If(o,e,t,n);default:return null}},c=l(a);if(c===null){let{defaultKeyType:u,defaultStringType:f}=e.options,d=i&&u||f;if(c=l(d),c===null)throw new Error(`Unsupported default string type ${d}`)}return c}Fo.stringifyString=_f});var ht=w(Jn=>{"use strict";var qf=ts(),oe=k(),Pf=ct(),Mf=dt();function $f(s,e){let t=Object.assign({blockQuote:!0,commentString:Pf.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},s.schema.toStringOptions,e),n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:s,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function Rf(s,e){if(e.tag){let i=s.filter(r=>r.tag===e.tag);if(i.length>0)return i.find(r=>r.format===e.format)??i[0]}let t,n;if(oe.isScalar(e)){n=e.value;let i=s.filter(r=>r.identify?.(n));if(i.length>1){let r=i.filter(o=>o.test);r.length>0&&(i=r)}t=i.find(r=>r.format===e.format)??i.find(r=>!r.format)}else n=e,t=s.find(i=>i.nodeClass&&n instanceof i.nodeClass);if(!t){let i=n?.constructor?.name??(n===null?"null":typeof n);throw new Error(`Tag not resolved for ${i} value`)}return t}function Ff(s,e,{anchors:t,doc:n}){if(!n.directives)return"";let i=[],r=(oe.isScalar(s)||oe.isCollection(s))&&s.anchor;r&&qf.anchorIsValid(r)&&(t.add(r),i.push(`&${r}`));let o=s.tag??(e.default?null:e.tag);return o&&i.push(n.directives.tagString(o)),i.join(" ")}function jf(s,e,t,n){if(oe.isPair(s))return s.toString(e,t,n);if(oe.isAlias(s)){if(e.doc.directives)return s.toString(e);if(e.resolvedAliases?.has(s))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(s):e.resolvedAliases=new Set([s]),s=s.resolve(e.doc)}let i,r=oe.isNode(s)?s:e.doc.createNode(s,{onTagObj:l=>i=l});i??(i=Rf(e.doc.schema.tags,r));let o=Ff(r,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);let a=typeof i.stringify=="function"?i.stringify(r,e,t,n):oe.isScalar(r)?Mf.stringifyString(r,e,t,n):r.toString(e,t,n);return o?oe.isScalar(r)||a[0]==="{"||a[0]==="["?`${o} ${a}`:`${o}
|
|
37
|
-
${e.indent}${a}`:a}Jn.createStringifyContext=$f;Jn.stringify=jf});var Vo=w(Do=>{"use strict";var se=k(),jo=I(),Bo=ht(),pt=ct();function Bf({key:s,value:e},t,n,i){let{allNullValues:r,doc:o,indent:a,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:f}}=t,d=se.isNode(s)&&s.comment||null;if(f){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(se.isCollection(s)||!se.isNode(s)&&typeof s=="object"){let C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let p=!f&&(!s||d&&e==null&&!t.inFlow||se.isCollection(s)||(se.isScalar(s)?s.type===jo.Scalar.BLOCK_FOLDED||s.type===jo.Scalar.BLOCK_LITERAL:typeof s=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!p&&(f||!r),indent:a+l});let g=!1,h=!1,m=Bo.stringify(s,t,()=>g=!0,()=>h=!0);if(!p&&!t.inFlow&&m.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(t.inFlow){if(r||e==null)return g&&n&&n(),m===""?"?":p?`? ${m}`:m}else if(r&&!f||e==null&&p)return m=`? ${m}`,d&&!g?m+=pt.lineComment(m,t.indent,c(d)):h&&i&&i(),m;g&&(d=null),p?(d&&(m+=pt.lineComment(m,t.indent,c(d))),m=`? ${m}
|
|
38
|
-
${a}:`):(m=`${m}:`,d&&(m+=pt.lineComment(m,t.indent,c(d))));let b,y,A;se.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))),t.implicitKey=!1,!p&&!d&&se.isScalar(e)&&(t.indentAtStart=m.length+1),h=!1,!u&&l.length>=2&&!t.inFlow&&!p&&se.isSeq(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let S=!1,v=Bo.stringify(e,t,()=>S=!0,()=>h=!0),E=" ";if(d||b||y){if(E=b?`
|
|
39
|
-
`:"",y){let C=c(y);E+=`
|
|
40
|
-
${pt.indentComment(C,t.indent)}`}v===""&&!t.inFlow?E===`
|
|
41
|
-
`&&A&&(E=`
|
|
42
|
-
|
|
43
|
-
`):E+=`
|
|
44
|
-
${t.indent}`}else if(!p&&se.isCollection(e)){let C=v[0],N=v.indexOf(`
|
|
45
|
-
`),O=N!==-1,K=t.inFlow??e.flow??e.items.length===0;if(O||!K){let Ae=!1;if(O&&(C==="&"||C==="!")){let _=v.indexOf(" ");C==="&"&&_!==-1&&_<N&&v[_+1]==="!"&&(_=v.indexOf(" ",_+1)),(_===-1||N<_)&&(Ae=!0)}Ae||(E=`
|
|
46
|
-
${t.indent}`)}}else(v===""||v[0]===`
|
|
47
|
-
`)&&(E="");return m+=E+v,t.inFlow?S&&n&&n():A&&!S?m+=pt.lineComment(m,t.indent,c(A)):h&&i&&i(),m}Do.stringifyPair=Bf});var Xn=w(Wn=>{"use strict";var Uo=Pt("process");function Df(s,...e){s==="debug"&&console.log(...e)}function Vf(s,e){(s==="debug"||s==="warn")&&(typeof Uo.emitWarning=="function"?Uo.emitWarning(e):console.warn(e))}Wn.debug=Df;Wn.warn=Vf});var ms=w(ps=>{"use strict";var hs=k(),Ko=I(),fs="<<",ds={identify:s=>s===fs||typeof s=="symbol"&&s.description===fs,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ko.Scalar(Symbol(fs)),{addToJSMap:Yo}),stringify:()=>fs},Uf=(s,e)=>(ds.identify(e)||hs.isScalar(e)&&(!e.type||e.type===Ko.Scalar.PLAIN)&&ds.identify(e.value))&&s?.doc.schema.tags.some(t=>t.tag===ds.tag&&t.default);function Yo(s,e,t){let n=Go(s,t);if(hs.isSeq(n))for(let i of n.items)zn(s,e,i);else if(Array.isArray(n))for(let i of n)zn(s,e,i);else zn(s,e,n)}function zn(s,e,t){let n=Go(s,t);if(!hs.isMap(n))throw new Error("Merge sources must be maps or map aliases");let i=n.toJSON(null,s,Map);for(let[r,o]of i)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 Go(s,e){return s&&hs.isAlias(e)?e.resolve(s.doc,s):e}ps.addMergeToJSMap=Yo;ps.isMergeKey=Uf;ps.merge=ds});var Zn=w(Wo=>{"use strict";var Kf=Xn(),Ho=ms(),Yf=ht(),Jo=k(),Qn=ne();function Gf(s,e,{key:t,value:n}){if(Jo.isNode(t)&&t.addToJSMap)t.addToJSMap(s,e,n);else if(Ho.isMergeKey(s,t))Ho.addMergeToJSMap(s,e,n);else{let i=Qn.toJS(t,"",s);if(e instanceof Map)e.set(i,Qn.toJS(n,i,s));else if(e instanceof Set)e.add(i);else{let r=Hf(t,i,s),o=Qn.toJS(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}function Hf(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(Jo.isNode(s)&&t?.doc){let n=Yf.createStringifyContext(t.doc,{});n.anchors=new Set;for(let r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;let i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),Kf.warn(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}Wo.addPairToJSMap=Gf});var ae=w(ei=>{"use strict";var Xo=lt(),Jf=Vo(),Wf=Zn(),gs=k();function Xf(s,e,t){let n=Xo.createNode(s,void 0,t),i=Xo.createNode(e,void 0,t);return new ys(n,i)}var ys=class s{constructor(e,t=null){Object.defineProperty(this,gs.NODE_TYPE,{value:gs.PAIR}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return gs.isNode(t)&&(t=t.clone(e)),gs.isNode(n)&&(n=n.clone(e)),new s(t,n)}toJSON(e,t){let n=t?.mapAsMap?new Map:{};return Wf.addPairToJSMap(t,n,this)}toString(e,t,n){return e?.doc?Jf.stringifyPair(this,e,t,n):JSON.stringify(this)}};ei.Pair=ys;ei.createPair=Xf});var ti=w(Qo=>{"use strict";var ye=k(),zo=ht(),bs=ct();function zf(s,e,t){return(e.inFlow??s.flow?Zf:Qf)(s,e,t)}function Qf({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:a}){let{indent:l,options:{commentString:c}}=t,u=Object.assign({},t,{indent:r,type:null}),f=!1,d=[];for(let g=0;g<e.length;++g){let h=e[g],m=null;if(ye.isNode(h))!f&&h.spaceBefore&&d.push(""),ws(t,d,h.commentBefore,f),h.comment&&(m=h.comment);else if(ye.isPair(h)){let y=ye.isNode(h.key)?h.key:null;y&&(!f&&y.spaceBefore&&d.push(""),ws(t,d,y.commentBefore,f))}f=!1;let b=zo.stringify(h,u,()=>m=null,()=>f=!0);m&&(b+=bs.lineComment(b,r,c(m))),f&&m&&(f=!1),d.push(n+b)}let p;if(d.length===0)p=i.start+i.end;else{p=d[0];for(let g=1;g<d.length;++g){let h=d[g];p+=h?`
|
|
48
|
-
${l}${h}`:`
|
|
49
|
-
`}}return s?(p+=`
|
|
50
|
-
`+bs.indentComment(c(s),l),a&&a()):f&&o&&o(),p}function Zf({items:s},e,{flowChars:t,itemIndent:n}){let{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:a}}=e;n+=r;let l=Object.assign({},e,{indent:n,inFlow:!0,type:null}),c=!1,u=0,f=[];for(let g=0;g<s.length;++g){let h=s[g],m=null;if(ye.isNode(h))h.spaceBefore&&f.push(""),ws(e,f,h.commentBefore,!1),h.comment&&(m=h.comment);else if(ye.isPair(h)){let y=ye.isNode(h.key)?h.key:null;y&&(y.spaceBefore&&f.push(""),ws(e,f,y.commentBefore,!1),y.comment&&(c=!0));let A=ye.isNode(h.value)?h.value:null;A?(A.comment&&(m=A.comment),A.commentBefore&&(c=!0)):h.value==null&&y?.comment&&(m=y.comment)}m&&(c=!0);let b=zo.stringify(h,l,()=>m=null);c||(c=f.length>u||b.includes(`
|
|
51
|
-
`)),g<s.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+=bs.lineComment(b,n,a(m))),f.push(b),u=f.length}let{start:d,end:p}=t;if(f.length===0)return d+p;if(!c){let g=f.reduce((h,m)=>h+m.length+2,2);c=e.options.lineWidth>0&&g>e.options.lineWidth}if(c){let g=d;for(let h of f)g+=h?`
|
|
52
|
-
${r}${i}${h}`:`
|
|
53
|
-
`;return`${g}
|
|
54
|
-
${i}${p}`}else return`${d}${o}${f.join(" ")}${o}${p}`}function ws({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){let r=bs.indentComment(e(n),s);t.push(r.trimStart())}}Qo.stringifyCollection=zf});var ce=w(ni=>{"use strict";var ed=ti(),td=Zn(),sd=rs(),le=k(),Ss=ae(),nd=I();function mt(s,e){let t=le.isScalar(e)?e.value:e;for(let n of s)if(le.isPair(n)&&(n.key===e||n.key===t||le.isScalar(n.key)&&n.key.value===t))return n}var si=class extends sd.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(le.MAP,e),this.items=[]}static from(e,t,n){let{keepUndefined:i,replacer:r}=n,o=new this(e),a=(l,c)=>{if(typeof r=="function")c=r.call(t,l,c);else if(Array.isArray(r)&&!r.includes(l))return;(c!==void 0||i)&&o.items.push(Ss.createPair(l,c,n))};if(t instanceof Map)for(let[l,c]of t)a(l,c);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){let n;le.isPair(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Ss.Pair(e,e?.value):n=new Ss.Pair(e.key,e.value);let i=mt(this.items,n.key),r=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);le.isScalar(i.value)&&nd.isScalarValue(n.value)?i.value.value=n.value:i.value=n.value}else if(r){let o=this.items.findIndex(a=>r(n,a)<0);o===-1?this.items.push(n):this.items.splice(o,0,n)}else this.items.push(n)}delete(e){let t=mt(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let i=mt(this.items,e)?.value;return(!t&&le.isScalar(i)?i.value:i)??void 0}has(e){return!!mt(this.items,e)}set(e,t){this.add(new Ss.Pair(e,t),!0)}toJSON(e,t,n){let i=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let r of this.items)td.addPairToJSMap(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(let i of this.items)if(!le.isPair(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ed.stringifyCollection(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}};ni.YAMLMap=si;ni.findPair=mt});var $e=w(ea=>{"use strict";var id=k(),Zo=ce(),rd={collection:"map",default:!0,nodeClass:Zo.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(s,e){return id.isMap(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>Zo.YAMLMap.from(s,e,t)};ea.map=rd});var ue=w(ta=>{"use strict";var od=lt(),ad=ti(),ld=rs(),As=k(),cd=I(),ud=ne(),ii=class extends ld.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(As.SEQ,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=Ns(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){let n=Ns(e);if(typeof n!="number")return;let i=this.items[n];return!t&&As.isScalar(i)?i.value:i}has(e){let t=Ns(e);return typeof t=="number"&&t<this.items.length}set(e,t){let n=Ns(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);let i=this.items[n];As.isScalar(i)&&cd.isScalarValue(t)?i.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let i=0;for(let r of this.items)n.push(ud.toJS(r,String(i++),t));return n}toString(e,t,n){return e?ad.stringifyCollection(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let a of t){if(typeof i=="function"){let l=t instanceof Set?a:String(o++);a=i.call(t,l,a)}r.items.push(od.createNode(a,void 0,n))}}return r}};function Ns(s){let e=As.isScalar(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}ta.YAMLSeq=ii});var Re=w(na=>{"use strict";var fd=k(),sa=ue(),dd={collection:"seq",default:!0,nodeClass:sa.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(s,e){return fd.isSeq(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>sa.YAMLSeq.from(s,e,t)};na.seq=dd});var gt=w(ia=>{"use strict";var hd=dt(),pd={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),hd.stringifyString(s,e,t,n)}};ia.string=pd});var Es=w(aa=>{"use strict";var ra=I(),oa={identify:s=>s==null,createNode:()=>new ra.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ra.Scalar(null),stringify:({source:s},e)=>typeof s=="string"&&oa.test.test(s)?s:e.options.nullStr};aa.nullTag=oa});var ri=w(ca=>{"use strict";var md=I(),la={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new md.Scalar(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&la.test.test(s)){let n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};ca.boolTag=la});var Fe=w(ua=>{"use strict";function gd({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);let i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=Object.is(n,-0)?"-0":JSON.stringify(n);if(!s&&e&&(!t||t==="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}ua.stringifyNumber=gd});var ai=w(vs=>{"use strict";var yd=I(),oi=Fe(),bd={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:oi.stringifyNumber},wd={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():oi.stringifyNumber(s)}},Sd={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){let e=new yd.Scalar(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:oi.stringifyNumber};vs.float=Sd;vs.floatExp=wd;vs.floatNaN=bd});var ci=w(Cs=>{"use strict";var fa=Fe(),Ts=s=>typeof s=="bigint"||Number.isInteger(s),li=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function da(s,e,t){let{value:n}=s;return Ts(n)&&n>=0?t+n.toString(e):fa.stringifyNumber(s)}var Nd={identify:s=>Ts(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>li(s,2,8,t),stringify:s=>da(s,8,"0o")},Ad={identify:Ts,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>li(s,0,10,t),stringify:fa.stringifyNumber},Ed={identify:s=>Ts(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>li(s,2,16,t),stringify:s=>da(s,16,"0x")};Cs.int=Ad;Cs.intHex=Ed;Cs.intOct=Nd});var pa=w(ha=>{"use strict";var vd=$e(),Td=Es(),Cd=Re(),kd=gt(),xd=ri(),ui=ai(),fi=ci(),Od=[vd.map,Cd.seq,kd.string,Td.nullTag,xd.boolTag,fi.intOct,fi.int,fi.intHex,ui.floatNaN,ui.floatExp,ui.float];ha.schema=Od});var ya=w(ga=>{"use strict";var Ld=I(),Id=$e(),_d=Re();function ma(s){return typeof s=="bigint"||Number.isInteger(s)}var ks=({value:s})=>JSON.stringify(s),qd=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:ks},{identify:s=>s==null,createNode:()=>new Ld.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ks},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:s=>s==="true",stringify:ks},{identify:ma,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>ma(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:ks}],Pd={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},Md=[Id.map,_d.seq].concat(qd,Pd);ga.schema=Md});var hi=w(ba=>{"use strict";var yt=Pt("buffer"),di=I(),$d=dt(),Rd={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof yt.Buffer=="function")return yt.Buffer.from(s,"base64");if(typeof atob=="function"){let t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){if(!t)return"";let o=t,a;if(typeof yt.Buffer=="function")a=o instanceof yt.Buffer?o.toString("base64"):yt.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=di.Scalar.BLOCK_LITERAL),e!==di.Scalar.QUOTE_DOUBLE){let l=Math.max(n.options.lineWidth-n.indent.length,n.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===di.Scalar.BLOCK_LITERAL?`
|
|
55
|
-
`:" ")}return $d.stringifyString({comment:s,type:e,value:a},n,i,r)}};ba.binary=Rd});var Ls=w(Os=>{"use strict";var xs=k(),pi=ae(),Fd=I(),jd=ue();function wa(s,e){if(xs.isSeq(s))for(let t=0;t<s.items.length;++t){let n=s.items[t];if(!xs.isPair(n)){if(xs.isMap(n)){n.items.length>1&&e("Each pair must have its own sequence indicator");let i=n.items[0]||new pi.Pair(new Fd.Scalar(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore}
|
|
56
|
-
${i.key.commentBefore}`:n.commentBefore),n.comment){let r=i.value??i.key;r.comment=r.comment?`${n.comment}
|
|
57
|
-
${r.comment}`:n.comment}n=i}s.items[t]=xs.isPair(n)?n:new pi.Pair(n)}}else e("Expected a sequence for this tag");return s}function Sa(s,e,t){let{replacer:n}=t,i=new jd.YAMLSeq(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.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;i.items.push(pi.createPair(a,l,t))}return i}var Bd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:wa,createNode:Sa};Os.createPairs=Sa;Os.pairs=Bd;Os.resolvePairs=wa});var yi=w(gi=>{"use strict";var Na=k(),mi=ne(),bt=ce(),Dd=ue(),Aa=Ls(),be=class s extends Dd.YAMLSeq{constructor(){super(),this.add=bt.YAMLMap.prototype.add.bind(this),this.delete=bt.YAMLMap.prototype.delete.bind(this),this.get=bt.YAMLMap.prototype.get.bind(this),this.has=bt.YAMLMap.prototype.has.bind(this),this.set=bt.YAMLMap.prototype.set.bind(this),this.tag=s.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let i of this.items){let r,o;if(Na.isPair(i)?(r=mi.toJS(i.key,"",t),o=mi.toJS(i.value,r,t)):r=mi.toJS(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){let i=Aa.createPairs(e,t,n),r=new this;return r.items=i.items,r}};be.tag="tag:yaml.org,2002:omap";var Vd={collection:"seq",identify:s=>s instanceof Map,nodeClass:be,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){let t=Aa.resolvePairs(s,e),n=[];for(let{key:i}of t.items)Na.isScalar(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new be,t)},createNode:(s,e,t)=>be.from(s,e,t)};gi.YAMLOMap=be;gi.omap=Vd});var ka=w(bi=>{"use strict";var Ea=I();function va({value:s,source:e},t){return e&&(s?Ta:Ca).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}var Ta={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ea.Scalar(!0),stringify:va},Ca={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ea.Scalar(!1),stringify:va};bi.falseTag=Ca;bi.trueTag=Ta});var xa=w(Is=>{"use strict";var Ud=I(),wi=Fe(),Kd={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:wi.stringifyNumber},Yd={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){let e=Number(s.value);return isFinite(e)?e.toExponential():wi.stringifyNumber(s)}},Gd={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){let e=new Ud.Scalar(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){let n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:wi.stringifyNumber};Is.float=Gd;Is.floatExp=Yd;Is.floatNaN=Kd});var La=w(St=>{"use strict";var Oa=Fe(),wt=s=>typeof s=="bigint"||Number.isInteger(s);function _s(s,e,t,{intAsBigInt:n}){let i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}let o=BigInt(s);return i==="-"?BigInt(-1)*o:o}let r=parseInt(s,t);return i==="-"?-1*r:r}function Si(s,e,t){let{value:n}=s;if(wt(n)){let i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return Oa.stringifyNumber(s)}var Hd={identify:wt,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>_s(s,2,2,t),stringify:s=>Si(s,2,"0b")},Jd={identify:wt,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>_s(s,1,8,t),stringify:s=>Si(s,8,"0")},Wd={identify:wt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>_s(s,0,10,t),stringify:Oa.stringifyNumber},Xd={identify:wt,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>_s(s,2,16,t),stringify:s=>Si(s,16,"0x")};St.int=Wd;St.intBin=Hd;St.intHex=Xd;St.intOct=Jd});var Ai=w(Ni=>{"use strict";var Ms=k(),qs=ae(),Ps=ce(),we=class s extends Ps.YAMLMap{constructor(e){super(e),this.tag=s.tag}add(e){let t;Ms.isPair(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new qs.Pair(e.key,null):t=new qs.Pair(e,null),Ps.findPair(this.items,t.key)||this.items.push(t)}get(e,t){let n=Ps.findPair(this.items,e);return!t&&Ms.isPair(n)?Ms.isScalar(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=Ps.findPair(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new qs.Pair(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){let{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(qs.createPair(o,null,n));return r}};we.tag="tag:yaml.org,2002:set";var zd={collection:"map",identify:s=>s instanceof Set,nodeClass:we,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>we.from(s,e,t),resolve(s,e){if(Ms.isMap(s)){if(s.hasAllNullValues(!0))return Object.assign(new we,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};Ni.YAMLSet=we;Ni.set=zd});var vi=w($s=>{"use strict";var Qd=Fe();function Ei(s,e){let t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,a)=>o*i(60)+i(a),i(0));return t==="-"?i(-1)*r:r}function Ia(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return Qd.stringifyNumber(s);let n="";e<0&&(n="-",e*=t(-1));let i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var Zd={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>Ei(s,t),stringify:Ia},eh={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>Ei(s,!1),stringify:Ia},_a={identify:s=>s 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(s){let e=s.match(_a.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,n,i,r,o,a]=e.map(Number),l=e[7]?Number((e[7]+"00").substr(1,3)):0,c=Date.UTC(t,n-1,i,r||0,o||0,a||0,l),u=e[8];if(u&&u!=="Z"){let f=Ei(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:s})=>s?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};$s.floatTime=eh;$s.intTime=Zd;$s.timestamp=_a});var Ma=w(Pa=>{"use strict";var th=$e(),sh=Es(),nh=Re(),ih=gt(),rh=hi(),qa=ka(),Ti=xa(),Rs=La(),oh=ms(),ah=yi(),lh=Ls(),ch=Ai(),Ci=vi(),uh=[th.map,nh.seq,ih.string,sh.nullTag,qa.trueTag,qa.falseTag,Rs.intBin,Rs.intOct,Rs.int,Rs.intHex,Ti.floatNaN,Ti.floatExp,Ti.float,rh.binary,oh.merge,ah.omap,lh.pairs,ch.set,Ci.intTime,Ci.floatTime,Ci.timestamp];Pa.schema=uh});var Ya=w(Oi=>{"use strict";var ja=$e(),fh=Es(),Ba=Re(),dh=gt(),hh=ri(),ki=ai(),xi=ci(),ph=pa(),mh=ya(),Da=hi(),Nt=ms(),Va=yi(),Ua=Ls(),$a=Ma(),Ka=Ai(),Fs=vi(),Ra=new Map([["core",ph.schema],["failsafe",[ja.map,Ba.seq,dh.string]],["json",mh.schema],["yaml11",$a.schema],["yaml-1.1",$a.schema]]),Fa={binary:Da.binary,bool:hh.boolTag,float:ki.float,floatExp:ki.floatExp,floatNaN:ki.floatNaN,floatTime:Fs.floatTime,int:xi.int,intHex:xi.intHex,intOct:xi.intOct,intTime:Fs.intTime,map:ja.map,merge:Nt.merge,null:fh.nullTag,omap:Va.omap,pairs:Ua.pairs,seq:Ba.seq,set:Ka.set,timestamp:Fs.timestamp},gh={"tag:yaml.org,2002:binary":Da.binary,"tag:yaml.org,2002:merge":Nt.merge,"tag:yaml.org,2002:omap":Va.omap,"tag:yaml.org,2002:pairs":Ua.pairs,"tag:yaml.org,2002:set":Ka.set,"tag:yaml.org,2002:timestamp":Fs.timestamp};function yh(s,e,t){let n=Ra.get(e);if(n&&!s)return t&&!n.includes(Nt.merge)?n.concat(Nt.merge):n.slice();let i=n;if(!i)if(Array.isArray(s))i=[];else{let r=Array.from(Ra.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(s))for(let r of s)i=i.concat(r);else typeof s=="function"&&(i=s(i.slice()));return t&&(i=i.concat(Nt.merge)),i.reduce((r,o)=>{let a=typeof o=="string"?Fa[o]:o;if(!a){let l=JSON.stringify(o),c=Object.keys(Fa).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},[])}Oi.coreKnownTags=gh;Oi.getTags=yh});var _i=w(Ga=>{"use strict";var Li=k(),bh=$e(),wh=Re(),Sh=gt(),js=Ya(),Nh=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0,Ii=class s{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(e)?js.getTags(e,"compat"):e?js.getTags(null,e):null,this.name=typeof r=="string"&&r||"core",this.knownTags=i?js.coreKnownTags:{},this.tags=js.getTags(t,this.name,n),this.toStringOptions=a??null,Object.defineProperty(this,Li.MAP,{value:bh.map}),Object.defineProperty(this,Li.SCALAR,{value:Sh.string}),Object.defineProperty(this,Li.SEQ,{value:wh.seq}),this.sortMapEntries=typeof o=="function"?o:o===!0?Nh:null}clone(){let e=Object.create(s.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}};Ga.Schema=Ii});var Ja=w(Ha=>{"use strict";var Ah=k(),qi=ht(),At=ct();function Eh(s,e){let t=[],n=e.directives===!0;if(e.directives!==!1&&s.directives){let l=s.directives.toString(s);l?(t.push(l),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");let i=qi.createStringifyContext(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");let l=r(s.commentBefore);t.unshift(At.indentComment(l,""))}let o=!1,a=null;if(s.contents){if(Ah.isNode(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){let u=r(s.contents.commentBefore);t.push(At.indentComment(u,""))}i.forceBlockIndent=!!s.comment,a=s.contents.comment}let l=a?void 0:()=>o=!0,c=qi.stringify(s.contents,i,()=>a=null,l);a&&(c+=At.lineComment(c,"",r(a))),(c[0]==="|"||c[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${c}`:t.push(c)}else t.push(qi.stringify(s.contents,i));if(s.directives?.docEnd)if(s.comment){let l=r(s.comment);l.includes(`
|
|
58
|
-
`)?(t.push("..."),t.push(At.indentComment(l,""))):t.push(`... ${l}`)}else t.push("...");else{let l=s.comment;l&&o&&(l=l.replace(/^\n+/,"")),l&&((!o||a)&&t[t.length-1]!==""&&t.push(""),t.push(At.indentComment(r(l),"")))}return t.join(`
|
|
59
|
-
`)+`
|
|
60
|
-
`}Ha.stringifyDocument=Eh});var Et=w(Wa=>{"use strict";var vh=at(),je=rs(),Y=k(),Th=ae(),Ch=ne(),kh=_i(),xh=Ja(),Pi=ts(),Oh=Fn(),Lh=lt(),Mi=Rn(),$i=class s{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Y.NODE_TYPE,{value:Y.DOC});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);let r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n?._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Mi.Directives({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){let e=Object.create(s.prototype,{[Y.NODE_TYPE]:{value:Y.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=Y.isNode(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){Be(this.contents)&&this.contents.add(e)}addIn(e,t){Be(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){let n=Pi.anchorNames(this);e.anchor=!t||n.has(t)?Pi.findNewAnchor(t||"a",n):t}return new vh.Alias(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){let m=y=>typeof y=="number"||y instanceof String||y instanceof Number,b=t.filter(m).map(String);b.length>0&&(t=t.concat(b)),i=t}else n===void 0&&t&&(n=t,t=void 0);let{aliasDuplicateObjects:r,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:c,tag:u}=n??{},{onAnchor:f,setAnchors:d,sourceObjects:p}=Pi.createNodeAnchors(this,o||"a"),g={aliasDuplicateObjects:r??!0,keepUndefined:l??!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:p},h=Lh.createNode(e,u,g);return a&&Y.isCollection(h)&&(h.flow=!0),d(),h}createPair(e,t,n={}){let i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new Th.Pair(i,r)}delete(e){return Be(this.contents)?this.contents.delete(e):!1}deleteIn(e){return je.isEmptyPath(e)?this.contents==null?!1:(this.contents=null,!0):Be(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Y.isCollection(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return je.isEmptyPath(e)?!t&&Y.isScalar(this.contents)?this.contents.value:this.contents:Y.isCollection(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Y.isCollection(this.contents)?this.contents.has(e):!1}hasIn(e){return je.isEmptyPath(e)?this.contents!==void 0:Y.isCollection(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=je.collectionFromPath(this.schema,[e],t):Be(this.contents)&&this.contents.set(e,t)}setIn(e,t){je.isEmptyPath(e)?this.contents=t:this.contents==null?this.contents=je.collectionFromPath(this.schema,Array.from(e),t):Be(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Mi.Directives({version:"1.1"}),n={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Mi.Directives({version:e}),n={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{let i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new kh.Schema(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){let a={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},l=Ch.toJS(this.contents,t??"",a);if(typeof r=="function")for(let{count:c,res:u}of a.anchors.values())r(u,c);return typeof o=="function"?Oh.applyReviver(o,{"":l},"",l):l}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}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 t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return xh.stringifyDocument(this,e)}};function Be(s){if(Y.isCollection(s))return!0;throw new Error("Expected a YAML collection as document contents")}Wa.Document=$i});var Ct=w(Tt=>{"use strict";var vt=class extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}},Ri=class extends vt{constructor(e,t,n){super("YAMLParseError",e,t,n)}},Fi=class extends vt{constructor(e,t,n){super("YAMLWarning",e,t,n)}},Ih=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(a=>e.linePos(a));let{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).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"),n>1&&/^ *$/.test(o.substring(0,r))){let a=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);a.length>80&&(a=a.substring(0,79)+`\u2026
|
|
61
|
-
`),o=a+o}if(/[^ ]/.test(o)){let a=1,l=t.linePos[1];l?.line===n&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-r)));let c=" ".repeat(r)+"^".repeat(a);t.message+=`:
|
|
62
|
-
|
|
63
|
-
${o}
|
|
64
|
-
${c}
|
|
65
|
-
`}};Tt.YAMLError=vt;Tt.YAMLParseError=Ri;Tt.YAMLWarning=Fi;Tt.prettifyError=Ih});var kt=w(Xa=>{"use strict";function _h(s,{flow:e,indicator:t,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:a}){let l=!1,c=a,u=a,f="",d="",p=!1,g=!1,h=null,m=null,b=null,y=null,A=null,S=null,v=null;for(let N of s)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),h&&(c&&N.type!=="comment"&&N.type!=="newline"&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),N.type){case"space":!e&&(t!=="doc-start"||n?.type!=="flow-collection")&&N.source.includes(" ")&&(h=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||t!=="seq-item-ind")&&(l=!0):d+=N.source,c=!0,p=!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 t:(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=t==="seq-item-ind"||t==="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=s[s.length-1],C=E?E.offset+E.source.length:i;return g&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=o||n?.type==="block-map"||n?.type==="block-seq")&&r(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:A,found:S,spaceBefore:l,comment:f,hasNewline:p,anchor:m,tag:b,newlineAfterProp:y,end:C,start:v??C}}Xa.resolveProps=_h});var Bs=w(za=>{"use strict";function ji(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
|
|
66
|
-
`))return!0;if(s.end){for(let e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(let e of s.items){for(let t of e.start)if(t.type==="newline")return!0;if(e.sep){for(let t of e.sep)if(t.type==="newline")return!0}if(ji(e.key)||ji(e.value))return!0}return!1;default:return!0}}za.containsNewline=ji});var Bi=w(Qa=>{"use strict";var qh=Bs();function Ph(s,e,t){if(e?.type==="flow-collection"){let n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&qh.containsNewline(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Qa.flowIndentCheck=Ph});var Di=w(el=>{"use strict";var Za=k();function Mh(s,e,t){let{uniqueKeys:n}=s.options;if(n===!1)return!1;let i=typeof n=="function"?n:(r,o)=>r===o||Za.isScalar(r)&&Za.isScalar(o)&&r.value===o.value;return e.some(r=>i(r.key,t))}el.mapIncludes=Mh});var ol=w(rl=>{"use strict";var tl=ae(),$h=ce(),sl=kt(),Rh=Bs(),nl=Bi(),Fh=Di(),il="All mapping items must start at the same column";function jh({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??$h.YAMLMap,a=new o(t.schema);t.atRoot&&(t.atRoot=!1);let l=n.offset,c=null;for(let u of n.items){let{start:f,key:d,sep:p,value:g}=u,h=sl.resolveProps(f,{indicator:"explicit-key-ind",next:d??p?.[0],offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0}),m=!h.found;if(m){if(d&&(d.type==="block-seq"?i(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(l,"BAD_INDENT",il)),!h.anchor&&!h.tag&&!p){c=h.end,h.comment&&(a.comment?a.comment+=`
|
|
67
|
-
`+h.comment:a.comment=h.comment);continue}(h.newlineAfterProp||Rh.containsNewline(d))&&i(d??f[f.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==n.indent&&i(l,"BAD_INDENT",il);t.atKey=!0;let b=h.end,y=d?s(t,d,h,i):e(t,b,f,null,h,i);t.schema.compat&&nl.flowIndentCheck(n.indent,d,i),t.atKey=!1,Fh.mapIncludes(t,a.items,y)&&i(b,"DUPLICATE_KEY","Map keys must be unique");let A=sl.resolveProps(p??[],{indicator:"map-value-ind",next:g,offset:y.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||d.type==="block-scalar"});if(l=A.end,A.found){m&&(g?.type==="block-map"&&!A.hasNewline&&i(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&h.start<A.found.offset-1024&&i(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?s(t,g,A,i):e(t,l,p,null,A,i);t.schema.compat&&nl.flowIndentCheck(n.indent,g,i),l=S.range[2];let v=new tl.Pair(y,S);t.options.keepSourceTokens&&(v.srcToken=u),a.items.push(v)}else{m&&i(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 tl.Pair(y);t.options.keepSourceTokens&&(S.srcToken=u),a.items.push(S)}}return c&&c<l&&i(c,"IMPOSSIBLE","Map comment with trailing content"),a.range=[n.offset,l,c??l],a}rl.resolveBlockMap=jh});var ll=w(al=>{"use strict";var Bh=ue(),Dh=kt(),Vh=Bi();function Uh({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=r?.nodeClass??Bh.YAMLSeq,a=new o(t.schema);t.atRoot&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let l=n.offset,c=null;for(let{start:u,value:f}of n.items){let d=Dh.resolveProps(u,{indicator:"seq-item-ind",next:f,offset:l,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||f)f?.type==="block-seq"?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(l,"MISSING_CHAR","Sequence item without - indicator");else{c=d.end,d.comment&&(a.comment=d.comment);continue}let p=f?s(t,f,d,i):e(t,d.end,u,null,d,i);t.schema.compat&&Vh.flowIndentCheck(n.indent,f,i),l=p.range[2],a.items.push(p)}return a.range=[n.offset,l,c??l],a}al.resolveBlockSeq=Uh});var De=w(cl=>{"use strict";function Kh(s,e,t,n){let i="";if(s){let r=!1,o="";for(let a of s){let{source:l,type:c}=a;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";i?i+=o+u:i=u,o="";break}case"newline":i&&(o+=l),r=!0;break;default:n(a,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=l.length}}return{comment:i,offset:e}}cl.resolveEnd=Kh});var hl=w(dl=>{"use strict";var Yh=k(),Gh=ae(),ul=ce(),Hh=ue(),Jh=De(),fl=kt(),Wh=Bs(),Xh=Di(),Vi="Block collections are not allowed within flow collections",Ui=s=>s&&(s.type==="block-map"||s.type==="block-seq");function zh({composeNode:s,composeEmptyNode:e},t,n,i,r){let o=n.start.source==="{",a=o?"flow map":"flow sequence",l=r?.nodeClass??(o?ul.YAMLMap:Hh.YAMLSeq),c=new l(t.schema);c.flow=!0;let u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=n.offset+n.start.source.length;for(let m=0;m<n.items.length;++m){let b=n.items[m],{start:y,key:A,sep:S,value:v}=b,E=fl.resolveProps(y,{flow:a,indicator:"explicit-key-ind",next:A??S?.[0],offset:f,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!E.found){if(!E.anchor&&!E.tag&&!S&&!v){m===0&&E.comma?i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`):m<n.items.length-1&&i(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&&t.options.strict&&Wh.containsNewline(A)&&i(A,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(m===0)E.comma&&i(E.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${a}`);else if(E.comma||i(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];Yh.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?s(t,v,E,i):e(t,E.end,S,null,E,i);c.items.push(C),f=C.range[2],Ui(v)&&i(C.range,"BLOCK_IN_FLOW",Vi)}else{t.atKey=!0;let C=E.end,N=A?s(t,A,E,i):e(t,C,y,null,E,i);Ui(A)&&i(N.range,"BLOCK_IN_FLOW",Vi),t.atKey=!1;let O=fl.resolveProps(S??[],{flow:a,indicator:"map-value-ind",next:v,offset:N.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(O.found){if(!o&&!E.found&&t.options.strict){if(S)for(let _ of S){if(_===O.found)break;if(_.type==="newline"){i(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}E.start<O.found.offset-1024&&i(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]===":"?i(v,"MISSING_CHAR",`Missing space after : in ${a}`):i(O.start,"MISSING_CHAR",`Missing , or : between ${a} items`));let K=v?s(t,v,O,i):O.found?e(t,O.end,S,null,O,i):null;K?Ui(v)&&i(K.range,"BLOCK_IN_FLOW",Vi):O.comment&&(N.comment?N.comment+=`
|
|
71
|
-
`+O.comment:N.comment=O.comment);let Ae=new Gh.Pair(N,K);if(t.options.keepSourceTokens&&(Ae.srcToken=b),o){let _=c;Xh.mapIncludes(t,_.items,N)&&i(C,"DUPLICATE_KEY","Map keys must be unique"),_.items.push(Ae)}else{let _=new ul.YAMLMap(t.schema);_.flow=!0,_.items.push(Ae);let br=(K??N).range;_.range=[N.range[0],br[1],br[2]],c.items.push(_)}f=K?K.range[2]:O.end}}let d=o?"}":"]",[p,...g]=n.end,h=f;if(p?.source===d)h=p.offset+p.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}`;i(f,u?"MISSING_CHAR":"BAD_INDENT",b),p&&p.source.length!==1&&g.unshift(p)}if(g.length>0){let m=Jh.resolveEnd(g,h,t.options.strict,i);m.comment&&(c.comment?c.comment+=`
|
|
72
|
-
`+m.comment:c.comment=m.comment),c.range=[n.offset,h,m.offset]}else c.range=[n.offset,h,h];return c}dl.resolveFlowCollection=zh});var ml=w(pl=>{"use strict";var Qh=k(),Zh=I(),ep=ce(),tp=ue(),sp=ol(),np=ll(),ip=hl();function Ki(s,e,t,n,i,r){let o=t.type==="block-map"?sp.resolveBlockMap(s,e,t,n,r):t.type==="block-seq"?np.resolveBlockSeq(s,e,t,n,r):ip.resolveFlowCollection(s,e,t,n,r),a=o.constructor;return i==="!"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function rp(s,e,t,n,i){let r=n.tag,o=r?e.directives.tagName(r.source,d=>i(r,"TAG_RESOLVE_FAILED",d)):null;if(t.type==="block-seq"){let{anchor:d,newlineAfterProp:p}=n,g=d&&r?d.offset>r.offset?d:r:d??r;g&&(!p||p.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}let a=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===ep.YAMLMap.tagName&&a==="map"||o===tp.YAMLSeq.tagName&&a==="seq")return Ki(s,e,t,i,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?i(r,"BAD_COLLECTION_TYPE",`${d.tag} used for ${a} collection, but expects ${d.collection??"scalar"}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),Ki(s,e,t,i,o)}let c=Ki(s,e,t,i,o,l),u=l.resolve?.(c,d=>i(r,"TAG_RESOLVE_FAILED",d),e.options)??c,f=Qh.isNode(u)?u:new Zh.Scalar(u);return f.range=c.range,f.tag=o,l?.format&&(f.format=l.format),f}pl.composeCollection=rp});var Gi=w(gl=>{"use strict";var Yi=I();function op(s,e,t){let n=e.offset,i=ap(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};let r=i.mode===">"?Yi.Scalar.BLOCK_FOLDED:Yi.Scalar.BLOCK_LITERAL,o=e.source?lp(e.source):[],a=o.length;for(let h=o.length-1;h>=0;--h){let m=o[h][1];if(m===""||m==="\r")a=h;else break}if(a===0){let h=i.chomp==="+"&&o.length>0?`
|
|
73
|
-
`.repeat(Math.max(1,o.length-1)):"",m=n+i.length;return e.source&&(m+=e.source.length),{value:h,type:r,comment:i.comment,range:[n,m,m]}}let l=e.indent+i.indent,c=e.offset+i.length,u=0;for(let h=0;h<a;++h){let[m,b]=o[h];if(b===""||b==="\r")i.indent===0&&m.length>l&&(l=m.length);else{m.length<l&&t(c+m.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(l=m.length),u=h,l===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=m.length+b.length+1}for(let h=o.length-1;h>=a;--h)o[h][0].length>l&&(a=h+1);let f="",d="",p=!1;for(let h=0;h<u;++h)f+=o[h][0].slice(l)+`
|
|
74
|
-
`;for(let h=u;h<a;++h){let[m,b]=o[h];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 ${i.indent?"explicit indentation indicator":"first line"}`;t(c-b.length-(y?2:1),"BAD_INDENT",S),m=""}r===Yi.Scalar.BLOCK_LITERAL?(f+=d+m.slice(l)+b,d=`
|
|
75
|
-
`):m.length>l||b[0]===" "?(d===" "?d=`
|
|
76
|
-
`:!p&&d===`
|
|
77
|
-
`&&(d=`
|
|
78
|
-
|
|
79
|
-
`),f+=d+m.slice(l)+b,d=`
|
|
80
|
-
`,p=!0):b===""?d===`
|
|
81
|
-
`?f+=`
|
|
82
|
-
`:d=`
|
|
83
|
-
`:(f+=d+b,d=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let h=a;h<o.length;++h)f+=`
|
|
84
|
-
`+o[h][0].slice(l);f[f.length-1]!==`
|
|
85
|
-
`&&(f+=`
|
|
86
|
-
`);break;default:f+=`
|
|
87
|
-
`}let g=n+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[n,g,g]}}function ap({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:i}=e[0],r=i[0],o=0,a="",l=-1;for(let d=1;d<i.length;++d){let p=i[d];if(!a&&(p==="-"||p==="+"))a=p;else{let g=Number(p);!o&&g?o=g:l===-1&&(l=s+d)}}l!==-1&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,u="",f=i.length;for(let d=1;d<e.length;++d){let p=e[d];switch(p.type){case"space":c=!0;case"newline":f+=p.source.length;break;case"comment":t&&!c&&n(p,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=p.source.length,u=p.source.substring(1);break;case"error":n(p,"UNEXPECTED_TOKEN",p.message),f+=p.source.length;break;default:{let g=`Unexpected token in block scalar header: ${p.type}`;n(p,"UNEXPECTED_TOKEN",g);let h=p.source;h&&typeof h=="string"&&(f+=h.length)}}}return{mode:r,indent:o,chomp:a,comment:u,length:f}}function lp(s){let e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n?.[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}gl.resolveBlockScalar=op});var Ji=w(bl=>{"use strict";var Hi=I(),cp=De();function up(s,e,t){let{offset:n,type:i,source:r,end:o}=s,a,l,c=(d,p,g)=>t(n+d,p,g);switch(i){case"scalar":a=Hi.Scalar.PLAIN,l=fp(r,c);break;case"single-quoted-scalar":a=Hi.Scalar.QUOTE_SINGLE,l=dp(r,c);break;case"double-quoted-scalar":a=Hi.Scalar.QUOTE_DOUBLE,l=hp(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}let u=n+r.length,f=cp.resolveEnd(o,u,e,t);return{value:l,type:a,comment:f.comment,range:[n,u,f.offset]}}function fp(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),yl(s)}function dp(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),yl(s.slice(1,-1)).replace(/''/g,"'")}function yl(s){let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
88
|
-
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
89
|
-
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,t=/[ \t]*(.*?)[ \t]*\r?\n/sy}let n=e.exec(s);if(!n)return s;let i=n[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(s);)n[1]===""?r===`
|
|
90
|
-
`?i+=r:r=`
|
|
91
|
-
`:(i+=r+n[1],r=" "),o=t.lastIndex;let a=/[ \t]*(.*)/sy;return a.lastIndex=o,n=a.exec(s),i+r+(n?.[1]??"")}function hp(s,e){let t="";for(let n=1;n<s.length-1;++n){let i=s[n];if(!(i==="\r"&&s[n+1]===`
|
|
92
|
-
`))if(i===`
|
|
93
|
-
`){let{fold:r,offset:o}=pp(s,n);t+=r,n=o}else if(i==="\\"){let r=s[++n],o=mp[r];if(o)t+=o;else if(r===`
|
|
94
|
-
`)for(r=s[n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="\r"&&s[n+1]===`
|
|
95
|
-
`)for(r=s[++n+1];r===" "||r===" ";)r=s[++n+1];else if(r==="x"||r==="u"||r==="U"){let a=r==="x"?2:r==="u"?4:8;t+=gp(s,n+1,a,e),n+=a}else{let a=s.substr(n-1,2);e(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),t+=a}}else if(i===" "||i===" "){let r=n,o=s[n+1];for(;o===" "||o===" ";)o=s[++n+1];o!==`
|
|
96
|
-
`&&!(o==="\r"&&s[n+2]===`
|
|
97
|
-
`)&&(t+=n>r?s.slice(r,n+1):i)}else t+=i}return(s[s.length-1]!=='"'||s.length===1)&&e(s.length,"MISSING_CHAR",'Missing closing "quote'),t}function pp(s,e){let t="",n=s[e+1];for(;(n===" "||n===" "||n===`
|
|
98
|
-
`||n==="\r")&&!(n==="\r"&&s[e+2]!==`
|
|
99
|
-
`);)n===`
|
|
100
|
-
`&&(t+=`
|
|
101
|
-
`),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}var mp={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 gp(s,e,t,n){let i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(o)}catch{let a=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}bl.resolveFlowScalar=up});var Nl=w(Sl=>{"use strict";var Se=k(),wl=I(),yp=Gi(),bp=Ji();function wp(s,e,t,n){let{value:i,type:r,comment:o,range:a}=e.type==="block-scalar"?yp.resolveBlockScalar(s,e,n):bp.resolveFlowScalar(e,s.options.strict,n),l=t?s.directives.tagName(t.source,f=>n(t,"TAG_RESOLVE_FAILED",f)):null,c;s.options.stringKeys&&s.atKey?c=s.schema[Se.SCALAR]:l?c=Sp(s.schema,i,l,t,n):e.type==="scalar"?c=Np(s,i,e,n):c=s.schema[Se.SCALAR];let u;try{let f=c.resolve(i,d=>n(t??e,"TAG_RESOLVE_FAILED",d),s.options);u=Se.isScalar(f)?f:new wl.Scalar(f)}catch(f){let d=f instanceof Error?f.message:String(f);n(t??e,"TAG_RESOLVE_FAILED",d),u=new wl.Scalar(i)}return u.range=a,u.source=i,r&&(u.type=r),l&&(u.tag=l),c.format&&(u.format=c.format),o&&(u.comment=o),u}function Sp(s,e,t,n,i){if(t==="!")return s[Se.SCALAR];let r=[];for(let a of s.tags)if(!a.collection&&a.tag===t)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=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[Se.SCALAR])}function Np({atKey:s,directives:e,schema:t},n,i,r){let o=t.tags.find(a=>(a.default===!0||s&&a.default==="key")&&a.test?.test(n))||t[Se.SCALAR];if(t.compat){let a=t.compat.find(l=>l.default&&l.test?.test(n))??t[Se.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(i,"TAG_RESOLVE_FAILED",u,!0)}}return o}Sl.composeScalar=wp});var El=w(Al=>{"use strict";function Ap(s,e,t){if(e){t??(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];i?.type==="space";)s+=i.source.length,i=e[++n];break}}return s}Al.emptyScalarPosition=Ap});var Cl=w(Xi=>{"use strict";var Ep=at(),vp=k(),Tp=ml(),vl=Nl(),Cp=De(),kp=El(),xp={composeNode:Tl,composeEmptyNode:Wi};function Tl(s,e,t,n){let i=s.atKey,{spaceBefore:r,comment:o,anchor:a,tag:l}=t,c,u=!0;switch(e.type){case"alias":c=Op(s,e,n),(a||l)&&n(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=vl.composeScalar(s,e,l,n),a&&(c.anchor=a.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=Tp.composeCollection(xp,s,e,t,n),a&&(c.anchor=a.source.substring(1))}catch(f){let d=f instanceof Error?f.message:String(f);n(e,"RESOURCE_EXHAUSTION",d)}break;default:{let f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",f),u=!1}}return c??(c=Wi(s,e.offset,void 0,null,t,n)),a&&c.anchor===""&&n(a,"BAD_ALIAS","Anchor cannot be an empty string"),i&&s.options.stringKeys&&(!vp.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&n(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),s.options.keepSourceTokens&&u&&(c.srcToken=e),c}function Wi(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:a,end:l},c){let u={type:"scalar",offset:kp.emptyScalarPosition(e,t,n),indent:-1,source:""},f=vl.composeScalar(s,u,a,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=l),f}function Op({options:s},{offset:e,source:t,end:n},i){let r=new Ep.Alias(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let o=e+t.length,a=Cp.resolveEnd(n,o,s.strict,i);return r.range=[e,o,a.offset],a.comment&&(r.comment=a.comment),r}Xi.composeEmptyNode=Wi;Xi.composeNode=Tl});var Ol=w(xl=>{"use strict";var Lp=Et(),kl=Cl(),Ip=De(),_p=kt();function qp(s,e,{offset:t,start:n,value:i,end:r},o){let a=Object.assign({_directives:e},s),l=new Lp.Document(void 0,a),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=_p.resolveProps(n,{indicator:"doc-start",next:i??r?.[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!u.hasNewline&&o(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?kl.composeNode(c,i,u,o):kl.composeEmptyNode(c,u.end,n,null,u,o);let f=l.contents.range[2],d=Ip.resolveEnd(r,f,!1,o);return d.comment&&(l.comment=d.comment),l.range=[t,f,d.offset],l}xl.composeDoc=qp});var Qi=w(_l=>{"use strict";var Pp=Pt("process"),Mp=Rn(),$p=Et(),xt=Ct(),Ll=k(),Rp=Ol(),Fp=De();function Ot(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];let{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function Il(s){let e="",t=!1,n=!1;for(let i=0;i<s.length;++i){let r=s[i];switch(r[0]){case"#":e+=(e===""?"":n?`
|
|
103
|
-
|
|
104
|
-
`:`
|
|
105
|
-
`)+(r.substring(1)||" "),t=!0,n=!1;break;case"%":s[i+1]?.[0]!=="#"&&(i+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}var zi=class{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{let o=Ot(t);r?this.warnings.push(new xt.YAMLWarning(o,n,i)):this.errors.push(new xt.YAMLParseError(o,n,i))},this.directives=new Mp.Directives({version:e.version||"1.2"}),this.options=e}decorate(e,t){let{comment:n,afterEmptyLine:i}=Il(this.prelude);if(n){let r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
106
|
-
${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(Ll.isCollection(r)&&!r.flow&&r.items.length>0){let o=r.items[0];Ll.isPair(o)&&(o=o.key);let a=o.commentBefore;o.commentBefore=a?`${n}
|
|
107
|
-
${a}`:n}else{let o=r.commentBefore;r.commentBefore=o?`${n}
|
|
108
|
-
${o}`:n}}if(t){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:Il(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(let i of e)yield*this.next(i);yield*this.end(t,n)}*next(e){switch(Pp.env.LOG_STREAM&&console.dir(e,{depth:null}),e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{let r=Ot(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{let t=Rp.composeDoc(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{let t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new xt.YAMLParseError(Ot(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){let n="Unexpected doc-end without preceding document";this.errors.push(new xt.YAMLParseError(Ot(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;let t=Fp.resolveEnd(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){let n=this.doc.comment;this.doc.comment=n?`${n}
|
|
109
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new xt.YAMLParseError(Ot(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){let n=Object.assign({_directives:this.directives},this.options),i=new $p.Document(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}};_l.Composer=zi});var Ml=w(Ds=>{"use strict";var jp=Gi(),Bp=Ji(),Dp=Ct(),ql=dt();function Vp(s,e=!0,t){if(s){let n=(i,r,o)=>{let a=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(a,r,o);else throw new Dp.YAMLParseError([a,a+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Bp.resolveFlowScalar(s,e,n);case"block-scalar":return jp.resolveBlockScalar({options:{strict:e}},s,n)}}return null}function Up(s,e){let{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,a=ql.stringifyString({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:n,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:n,source:u}];return Pl(d,l)||d.push({type:"newline",offset:-1,indent:n,source:`
|
|
113
|
-
`}),{type:"block-scalar",offset:r,indent:n,props:d,source:f}}case'"':return{type:"double-quoted-scalar",offset:r,indent:n,source:a,end:l};case"'":return{type:"single-quoted-scalar",offset:r,indent:n,source:a,end:l};default:return{type:"scalar",offset:r,indent:n,source:a,end:l}}}function Kp(s,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:r=!1,type:o}=t,a="indent"in s?s.indent:null;if(n&&typeof a=="number"&&(a+=2),!o)switch(s.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{let c=s.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=ql.stringifyString({type:o,value:e},{implicitKey:i||a===null,indent:a!==null&&a>0?" ".repeat(a):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":Yp(s,l);break;case'"':Zi(s,l,"double-quoted-scalar");break;case"'":Zi(s,l,"single-quoted-scalar");break;default:Zi(s,l,"scalar")}}function Yp(s,e){let t=e.indexOf(`
|
|
114
|
-
`),n=e.substring(0,t),i=e.substring(t+1)+`
|
|
115
|
-
`;if(s.type==="block-scalar"){let r=s.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=n,s.source=i}else{let{offset:r}=s,o="indent"in s?s.indent:-1,a=[{type:"block-scalar-header",offset:r,indent:o,source:n}];Pl(a,"end"in s?s.end:void 0)||a.push({type:"newline",offset:-1,indent:o,source:`
|
|
116
|
-
`});for(let l of Object.keys(s))l!=="type"&&l!=="offset"&&delete s[l];Object.assign(s,{type:"block-scalar",indent:o,props:a,source:i})}}function Pl(s,e){if(e)for(let t of e)switch(t.type){case"space":case"comment":s.push(t);break;case"newline":return s.push(t),!0}return!1}function Zi(s,e,t){switch(s.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":s.type=t,s.source=e;break;case"block-scalar":{let n=s.props.slice(1),i=e.length;s.props[0].type==="block-scalar-header"&&(i-=s.props[0].source.length);for(let r of n)r.offset+=i;delete s.props,Object.assign(s,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{let i={type:"newline",offset:s.offset+e.length,indent:s.indent,source:`
|
|
117
|
-
`};delete s.items,Object.assign(s,{type:t,source:e,end:[i]});break}default:{let n="indent"in s?s.indent:-1,i="end"in s&&Array.isArray(s.end)?s.end.filter(r=>r.type==="space"||r.type==="comment"||r.type==="newline"):[];for(let r of Object.keys(s))r!=="type"&&r!=="offset"&&delete s[r];Object.assign(s,{type:t,indent:n,source:e,end:i})}}}Ds.createScalarToken=Up;Ds.resolveAsScalar=Vp;Ds.setScalarValue=Kp});var Rl=w($l=>{"use strict";var Gp=s=>"type"in s?Us(s):Vs(s);function Us(s){switch(s.type){case"block-scalar":{let e="";for(let t of s.props)e+=Us(t);return e+s.source}case"block-map":case"block-seq":{let e="";for(let t of s.items)e+=Vs(t);return e}case"flow-collection":{let e=s.start.source;for(let t of s.items)e+=Vs(t);for(let t of s.end)e+=t.source;return e}case"document":{let e=Vs(s);if(s.end)for(let t of s.end)e+=t.source;return e}default:{let e=s.source;if("end"in s&&s.end)for(let t of s.end)e+=t.source;return e}}}function Vs({start:s,key:e,sep:t,value:n}){let i="";for(let r of s)i+=r.source;if(e&&(i+=Us(e)),t)for(let r of t)i+=r.source;return n&&(i+=Us(n)),i}$l.stringify=Gp});var Dl=w(Bl=>{"use strict";var er=Symbol("break visit"),Hp=Symbol("skip children"),Fl=Symbol("remove item");function Ne(s,e){"type"in s&&s.type==="document"&&(s={start:s.start,value:s.value}),jl(Object.freeze([]),s,e)}Ne.BREAK=er;Ne.SKIP=Hp;Ne.REMOVE=Fl;Ne.itemAtPath=(s,e)=>{let t=s;for(let[n,i]of e){let r=t?.[n];if(r&&"items"in r)t=r.items[i];else return}return t};Ne.parentCollection=(s,e)=>{let t=Ne.itemAtPath(s,e.slice(0,-1)),n=e[e.length-1][0],i=t?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function jl(s,e,t){let n=t(e,s);if(typeof n=="symbol")return n;for(let i of["key","value"]){let r=e[i];if(r&&"items"in r){for(let o=0;o<r.items.length;++o){let a=jl(Object.freeze(s.concat([[i,o]])),r.items[o],t);if(typeof a=="number")o=a-1;else{if(a===er)return er;a===Fl&&(r.items.splice(o,1),o-=1)}}typeof n=="function"&&i==="key"&&(n=n(e,s))}}return typeof n=="function"?n(e,s):n}Bl.visit=Ne});var Ks=w(D=>{"use strict";var tr=Ml(),Jp=Rl(),Wp=Dl(),sr="\uFEFF",nr="",ir="",rr="",Xp=s=>!!s&&"items"in s,zp=s=>!!s&&(s.type==="scalar"||s.type==="single-quoted-scalar"||s.type==="double-quoted-scalar"||s.type==="block-scalar");function Qp(s){switch(s){case sr:return"<BOM>";case nr:return"<DOC>";case ir:return"<FLOW_END>";case rr:return"<SCALAR>";default:return JSON.stringify(s)}}function Zp(s){switch(s){case sr:return"byte-order-mark";case nr:return"doc-mode";case ir:return"flow-error-end";case rr: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(s[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=tr.createScalarToken;D.resolveAsScalar=tr.resolveAsScalar;D.setScalarValue=tr.setScalarValue;D.stringify=Jp.stringify;D.visit=Wp.visit;D.BOM=sr;D.DOCUMENT=nr;D.FLOW_END=ir;D.SCALAR=rr;D.isCollection=Xp;D.isScalar=zp;D.prettyToken=Qp;D.tokenType=Zp});var lr=w(Ul=>{"use strict";var Lt=Ks();function J(s){switch(s){case void 0:case" ":case`
|
|
120
|
-
`:case"\r":case" ":return!0;default:return!1}}var Vl=new Set("0123456789ABCDEFabcdef"),em=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ys=new Set(",[]{}"),tm=new Set(` ,[]{}
|
|
121
|
-
\r `),or=s=>!s||tm.has(s),ar=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,t=!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=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===`
|
|
122
|
-
`?!0:t==="\r"?this.buffer[e+1]===`
|
|
123
|
-
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){let i=this.buffer[n+e+1];if(i===`
|
|
124
|
-
`||!i&&!this.atEnd)return e+n+1}return t===`
|
|
125
|
-
`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){let n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&J(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]===Lt.BOM&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let t=e.length,n=e.indexOf("#");for(;n!==-1;){let r=e[n-1];if(r===" "||r===" "){t=n-1;break}else n=e.indexOf("#",n+1)}for(;;){let r=e[t-1];if(r===" "||r===" ")t-=1;else break}let i=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-i),this.pushNewline(),"stream"}if(this.atLineEnd()){let t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield Lt.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 t=this.peek(3);if((t==="---"||t==="...")&&J(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,t==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!J(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&J(t)){let n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);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(or),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);let i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&J(i[3]))&&!(n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}")))return this.flowLevel=0,yield Lt.FLOW_END,yield*this.parseLineStart();let r=0;for(;i[r]===",";)r+=yield*this.pushCount(1),r+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(r+=yield*this.pushIndicators(),i[r]){case void 0:return"flow";case"#":return yield*this.pushCount(i.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(or),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let o=this.charAt(1);if(this.flowKey||J(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),t=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;t!==-1&&this.buffer[t+1]==="'";)t=this.buffer.indexOf("'",t+2);else for(;t!==-1;){let r=0;for(;this.buffer[t-1-r]==="\\";)r+=1;if(r%2===0)break;t=this.buffer.indexOf('"',t+1)}let n=this.buffer.substring(0,t),i=n.indexOf(`
|
|
127
|
-
`,this.pos);if(i!==-1){for(;i!==-1;){let r=this.continueScalar(i+1);if(r===-1)break;i=n.indexOf(`
|
|
128
|
-
`,r)}i!==-1&&(t=i-(n[i-1]==="\r"?2:1))}if(t===-1){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){let t=this.buffer[++e];if(t==="+")this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>J(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let r=this.pos;n=this.buffer[r];++r)switch(n){case" ":t+=1;break;case`
|
|
129
|
-
`:e=r,t=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(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t: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 i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===`
|
|
132
|
-
`;)n=this.buffer[++i];e=i-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+t>a)e=r;else break}while(!0);return yield Lt.SCALAR,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let e=this.flowLevel>0,t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){let r=this.buffer[n+1];if(J(r)||e&&Ys.has(r))break;t=n}else if(J(i)){let r=this.buffer[n+1];if(i==="\r"&&(r===`
|
|
134
|
-
`?(n+=1,i=`
|
|
135
|
-
`,r=this.buffer[n+1]):t=n),r==="#"||e&&Ys.has(r))break;if(i===`
|
|
136
|
-
`){let o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Ys.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield Lt.SCALAR,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){let n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(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(or),e+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let t=this.flowLevel>0,n=this.charAt(1);if(J(n)||t&&Ys.has(n)){t?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,t=this.buffer[e];for(;!J(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(em.has(t))t=this.buffer[++e];else if(t==="%"&&Vl.has(this.buffer[e+1])&&Vl.has(this.buffer[e+2]))t=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 t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");let i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}};Ul.Lexer=ar});var ur=w(Kl=>{"use strict";var cr=class{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,n=this.lineStarts.length;for(;t<n;){let r=t+n>>1;this.lineStarts[r]<e?t=r+1:n=r}if(this.lineStarts[t]===e)return{line:t+1,col:1};if(t===0)return{line:0,col:e};let i=this.lineStarts[t-1];return{line:t,col:e-i+1}}}};Kl.LineCounter=cr});var dr=w(Wl=>{"use strict";var sm=Pt("process"),Yl=Ks(),nm=lr();function fe(s,e){for(let t=0;t<s.length;++t)if(s[t].type===e)return!0;return!1}function Gl(s){for(let e=0;e<s.length;++e)switch(s[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function Jl(s){switch(s?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Gs(s){switch(s.type){case"document":return s.start;case"block-map":{let e=s.items[s.items.length-1];return e.sep??e.start}case"block-seq":return s.items[s.items.length-1].start;default:return[]}}function Ve(s){if(s.length===0)return[];let e=s.length;e:for(;--e>=0;)switch(s[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;s[++e]?.type==="space";);return s.splice(e,s.length)}function Hs(s,e){if(e.length<1e5)Array.prototype.push.apply(s,e);else for(let t=0;t<e.length;++t)s.push(e[t])}function Hl(s){if(s.start.type==="flow-seq-start")for(let e of s.items)e.sep&&!e.value&&!fe(e.start,"explicit-key-ind")&&!fe(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Jl(e.value)?e.value.end?Hs(e.value.end,e.sep):e.value.end=e.sep:Hs(e.start,e.sep),delete e.sep)}var fr=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 nm.Lexer,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let n of this.lexer.lex(e,t))yield*this.next(n);t||(yield*this.end())}*next(e){if(this.source=e,sm.env.LOG_TOKENS&&console.log("|",Yl.prettyToken(e)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}let t=Yl.tokenType(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){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 n=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:n,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 t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{let n=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in n?n.indent:0:t.type==="flow-collection"&&n.type==="document"&&(t.indent=0),t.type==="flow-collection"&&Hl(t),n.type){case"document":n.value=t;break;case"block-scalar":n.props.push(t);break;case"block-map":{let i=n.items[n.items.length-1];if(i.value){n.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=t;else{Object.assign(i,{key:t,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case"block-seq":{let i=n.items[n.items.length-1];i.value?n.items.push({start:[],value:t}):i.value=t;break}case"flow-collection":{let i=n.items[n.items.length-1];!i||i.value?n.items.push({start:[],key:t,sep:[]}):i.sep?i.value=t:Object.assign(i,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((n.type==="document"||n.type==="block-map"||n.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){let i=t.items[t.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&Gl(i.start)===-1&&(t.indent===0||i.start.every(r=>r.type!=="comment"||r.indent<t.indent))&&(n.type==="document"?n.end=i.start:n.items.push({start:i.start}),t.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":{Gl(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 t=this.startBlockValue(e);t?this.stack.push(t):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 t=Gs(this.peek(2)),n=Ve(t),i;e.end?(i=e.end,i.push(this.sourceToken),delete e.end):i=[this.sourceToken];let r={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:i}]};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 t=this.source.indexOf(`
|
|
139
|
-
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
140
|
-
`,t)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Hs(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind",r=[];if(i&&t.sep&&!t.value){let o=[];for(let a=0;a<t.sep.length;++a){let l=t.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=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.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(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(fe(t.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(Jl(t.key)&&!fe(t.sep,"newline")){let o=Ve(t.start),a=t.key,l=t.sep;l.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:l}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(fe(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let o=Ve(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):fe(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{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);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{let o=this.startBlockValue(e);if(o){if(o.type==="block-seq"){if(!t.explicitKey&&t.sep&&!fe(t.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 n&&e.items.push({start:r});this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){let n="end"in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type==="comment"?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let i=e.items[e.items.length-2]?.value?.end;if(Array.isArray(i)){Hs(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||fe(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*this.pop(),n=this.peek(1);while(n?.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){let i=Gs(n),r=Ve(i);Hl(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 t=this.source.indexOf(`
|
|
141
|
-
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
142
|
-
`,t)+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 t=Gs(e),n=Ve(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let t=Gs(e),n=Ve(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.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())}}};Wl.Parser=fr});var ec=w(_t=>{"use strict";var Xl=Qi(),im=Et(),It=Ct(),rm=Xn(),om=k(),am=ur(),zl=dr();function Ql(s){let e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new am.LineCounter||null,prettyErrors:e}}function lm(s,e={}){let{lineCounter:t,prettyErrors:n}=Ql(e),i=new zl.Parser(t?.addNewLine),r=new Xl.Composer(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(let a of o)a.errors.forEach(It.prettifyError(s,t)),a.warnings.forEach(It.prettifyError(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function Zl(s,e={}){let{lineCounter:t,prettyErrors:n}=Ql(e),i=new zl.Parser(t?.addNewLine),r=new Xl.Composer(e),o=null;for(let a of r.compose(i.parse(s),!0,s.length))if(!o)o=a;else if(o.options.logLevel!=="silent"){o.errors.push(new It.YAMLParseError(a.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(It.prettifyError(s,t)),o.warnings.forEach(It.prettifyError(s,t))),o}function cm(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);let i=Zl(s,t);if(!i)return null;if(i.warnings.forEach(r=>rm.warn(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function um(s,e,t){let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){let i=Math.round(t);t=i<1?void 0:i>8?{indent:8}:{indent:i}}if(s===void 0){let{keepUndefined:i}=t??e??{};if(!i)return}return om.isDocument(s)&&!n?s.toString(t):new im.Document(s,n,t).toString(t)}_t.parse=cm;_t.parseAllDocuments=lm;_t.parseDocument=Zl;_t.stringify=um});var sc=w(x=>{"use strict";var fm=Qi(),dm=Et(),hm=_i(),hr=Ct(),pm=at(),de=k(),mm=ae(),gm=I(),ym=ce(),bm=ue(),wm=Ks(),Sm=lr(),Nm=ur(),Am=dr(),Js=ec(),tc=nt();x.Composer=fm.Composer;x.Document=dm.Document;x.Schema=hm.Schema;x.YAMLError=hr.YAMLError;x.YAMLParseError=hr.YAMLParseError;x.YAMLWarning=hr.YAMLWarning;x.Alias=pm.Alias;x.isAlias=de.isAlias;x.isCollection=de.isCollection;x.isDocument=de.isDocument;x.isMap=de.isMap;x.isNode=de.isNode;x.isPair=de.isPair;x.isScalar=de.isScalar;x.isSeq=de.isSeq;x.Pair=mm.Pair;x.Scalar=gm.Scalar;x.YAMLMap=ym.YAMLMap;x.YAMLSeq=bm.YAMLSeq;x.CST=wm;x.Lexer=Sm.Lexer;x.LineCounter=Nm.LineCounter;x.Parser=Am.Parser;x.parse=Js.parse;x.parseAllDocuments=Js.parseAllDocuments;x.parseDocument=Js.parseDocument;x.stringify=Js.stringify;x.visit=tc.visit;x.visitAsync=tc.visitAsync});var kr=":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",fc=kr+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",dc="["+kr+"]["+fc+"]*",hc=new RegExp("^"+dc+"$");function $t(s,e){let t=[],n=e.exec(s);for(;n;){let i=[];i.startIndex=e.lastIndex-n[0].length;let r=n.length;for(let o=0;o<r;o++)i.push(n[o]);t.push(i),n=e.exec(s)}return t}var Zs=function(s){let e=hc.exec(s);return!(e===null||typeof e>"u")};function xr(s){return typeof s<"u"}var Ye=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],Rt=["__proto__","constructor","prototype"];var pc={allowBooleanAttributes:!1,unpairedTags:[]};function qr(s,e){e=Object.assign({},pc,e);let t=[],n=!1,i=!1;s[0]==="\uFEFF"&&(s=s.substr(1));for(let r=0;r<s.length;r++)if(s[r]==="<"&&s[r+1]==="?"){if(r+=2,r=Lr(s,r),r.err)return r}else if(s[r]==="<"){let o=r;if(r++,s[r]==="!"){r=Ir(s,r);continue}else{let a=!1;s[r]==="/"&&(a=!0,r++);let l="";for(;r<s.length&&s[r]!==">"&&s[r]!==" "&&s[r]!==" "&&s[r]!==`
|
|
143
|
-
`&&s[r]!=="\r";r++)l+=s[r];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),r--),!Ac(l)){let f;return l.trim().length===0?f="Invalid space after '<'.":f="Tag '"+l+"' is an invalid name.",L("InvalidTag",f,M(s,r))}let c=yc(s,r);if(c===!1)return L("InvalidAttr","Attributes for '"+l+"' have open quote.",M(s,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=_r(u,e);if(d===!0)n=!0;else return L(d.err.code,d.err.msg,M(s,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(s,o));if(t.length===0)return L("InvalidTag","Closing tag '"+l+"' has not been opened.",M(s,o));{let f=t.pop();if(l!==f.tagName){let d=M(s,f.tagStartPos);return L("InvalidTag","Expected closing tag '"+f.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+l+"'.",M(s,o))}t.length==0&&(i=!0)}}else return L("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",M(s,r));else{let f=_r(u,e);if(f!==!0)return L(f.err.code,f.err.msg,M(s,r-u.length+f.err.line));if(i===!0)return L("InvalidXml","Multiple possible root nodes found.",M(s,r));e.unpairedTags.indexOf(l)!==-1||t.push({tagName:l,tagStartPos:o}),n=!0}for(r++;r<s.length;r++)if(s[r]==="<")if(s[r+1]==="!"){r++,r=Ir(s,r);continue}else if(s[r+1]==="?"){if(r=Lr(s,++r),r.err)return r}else break;else if(s[r]==="&"){let f=Sc(s,r);if(f==-1)return L("InvalidChar","char '&' is not expected.",M(s,r));r=f}else if(i===!0&&!Or(s[r]))return L("InvalidXml","Extra text at the end",M(s,r));s[r]==="<"&&r--}}else{if(Or(s[r]))continue;return L("InvalidChar","char '"+s[r]+"' is not expected.",M(s,r))}if(n){if(t.length==1)return L("InvalidTag","Unclosed tag '"+t[0].tagName+"'.",M(s,t[0].tagStartPos));if(t.length>0)return L("InvalidXml","Invalid '"+JSON.stringify(t.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 Or(s){return s===" "||s===" "||s===`
|
|
144
|
-
`||s==="\r"}function Lr(s,e){let t=e;for(;e<s.length;e++)if(s[e]=="?"||s[e]==" "){let n=s.substr(t,e-t);if(e>5&&n==="xml")return L("InvalidXml","XML declaration allowed only at the start of the document.",M(s,e));if(s[e]=="?"&&s[e+1]==">"){e++;break}else continue}return e}function Ir(s,e){if(s.length>e+5&&s[e+1]==="-"&&s[e+2]==="-"){for(e+=3;e<s.length;e++)if(s[e]==="-"&&s[e+1]==="-"&&s[e+2]===">"){e+=2;break}}else if(s.length>e+8&&s[e+1]==="D"&&s[e+2]==="O"&&s[e+3]==="C"&&s[e+4]==="T"&&s[e+5]==="Y"&&s[e+6]==="P"&&s[e+7]==="E"){let t=1;for(e+=8;e<s.length;e++)if(s[e]==="<")t++;else if(s[e]===">"&&(t--,t===0))break}else if(s.length>e+9&&s[e+1]==="["&&s[e+2]==="C"&&s[e+3]==="D"&&s[e+4]==="A"&&s[e+5]==="T"&&s[e+6]==="A"&&s[e+7]==="["){for(e+=8;e<s.length;e++)if(s[e]==="]"&&s[e+1]==="]"&&s[e+2]===">"){e+=2;break}}return e}var mc='"',gc="'";function yc(s,e){let t="",n="",i=!1;for(;e<s.length;e++){if(s[e]===mc||s[e]===gc)n===""?n=s[e]:n!==s[e]||(n="");else if(s[e]===">"&&n===""){i=!0;break}t+=s[e]}return n!==""?!1:{value:t,index:e,tagClosed:i}}var bc=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function _r(s,e){let t=$t(s,bc),n={};for(let i=0;i<t.length;i++){if(t[i][1].length===0)return L("InvalidAttr","Attribute '"+t[i][2]+"' has no space in starting.",Ge(t[i]));if(t[i][3]!==void 0&&t[i][4]===void 0)return L("InvalidAttr","Attribute '"+t[i][2]+"' is without value.",Ge(t[i]));if(t[i][3]===void 0&&!e.allowBooleanAttributes)return L("InvalidAttr","boolean attribute '"+t[i][2]+"' is not allowed.",Ge(t[i]));let r=t[i][2];if(!Nc(r))return L("InvalidAttr","Attribute '"+r+"' is an invalid name.",Ge(t[i]));if(!Object.prototype.hasOwnProperty.call(n,r))n[r]=1;else return L("InvalidAttr","Attribute '"+r+"' is repeated.",Ge(t[i]))}return!0}function wc(s,e){let t=/\d/;for(s[e]==="x"&&(e++,t=/[\da-fA-F]/);e<s.length;e++){if(s[e]===";")return e;if(!s[e].match(t))break}return-1}function Sc(s,e){if(e++,s[e]===";")return-1;if(s[e]==="#")return e++,wc(s,e);let t=0;for(;e<s.length;e++,t++)if(!(s[e].match(/\w/)&&t<20)){if(s[e]===";")break;return-1}return e}function L(s,e,t){return{err:{code:s,msg:e,line:t.line||t,col:t.col}}}function Nc(s){return Zs(s)}function Ac(s){return Zs(s)}function M(s,e){let t=s.substring(0,e).split(/\r?\n/);return{line:t.length,col:t[t.length-1].length+1}}function Ge(s){return s.startIndex+s[1].length}var en={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 He={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},tn={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 ve=Object.freeze({ALLOW:"allow",BLOCK:"block",THROW:"throw"}),Ec=new Set("!?\\\\/[]$%{}^&*()<>|+");function Pr(s){if(s[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${s}"`);for(let e of s)if(Ec.has(e))throw new Error(`[EntityReplacer] Invalid character '${e}' in entity name: "${s}"`);return s}function Je(...s){let e=Object.create(null);for(let t of s)if(t)for(let n of Object.keys(t)){let i=t[n];if(typeof i=="string")e[n]=i;else if(i&&typeof i=="object"&&i.val!==void 0){let r=i.val;typeof r=="string"&&(e[n]=r)}}return e}var pe="external",Ft="base",sn="all";function vc(s){return!s||s===pe?new Set([pe]):s===sn?new Set([sn]):s===Ft?new Set([Ft]):Array.isArray(s)?new Set(s):new Set([pe])}var $=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Tc=new Set([9,10,13]);function Cc(s){if(!s)return{xmlVersion:1,onLevel:$.allow,nullLevel:$.remove};let e=s.xmlVersion===1.1?1.1:1,t=$[s.onNCR]??$.allow,n=$[s.nullNCR]??$.remove,i=Math.max(n,$.remove);return{xmlVersion:e,onLevel:t,nullLevel:i}}var Te=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:n=>n,this._limitTiers=vc(this._limit.applyLimitsTo??pe),this._numericAllowed=e.numericAllowed??!0,this._baseMap=Je(He,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 t=Cc(e.ncr);this._ncrXmlVersion=t.xmlVersion,this._ncrOnLevel=t.onLevel,this._ncrNullLevel=t.nullLevel,this._onExternalEntity=typeof e.onExternalEntity=="function"?e.onExternalEntity:null,this._onInputEntity=typeof e.onInputEntity=="function"?e.onInputEntity:null}_applyRegistrationHook(e,t,n,i){if(!e)return!0;let r=e(t,n);if(r===ve.BLOCK)return!1;if(r===ve.THROW)throw new Error(`[EntityDecoder] Registration of ${i} entity "&${t};" was rejected by hook`);return!0}setExternalEntities(e){if(e)for(let i of Object.keys(e))Pr(i);if(!this._onExternalEntity){this._externalMap=Je(e);return}let t=Je(e),n=Object.create(null);for(let[i,r]of Object.entries(t))this._applyRegistrationHook(this._onExternalEntity,i,r,"external")&&(n[i]=r);this._externalMap=n}addExternalEntity(e,t){Pr(e),typeof t=="string"&&t.indexOf("&")===-1&&this._applyRegistrationHook(this._onExternalEntity,e,t,"external")&&(this._externalMap[e]=t)}addInputEntities(e){if(this._totalExpansions=0,this._expandedLength=0,!this._onInputEntity){this._inputMap=Je(e);return}let t=Je(e),n=Object.create(null);for(let[i,r]of Object.entries(t))this._applyRegistrationHook(this._onInputEntity,i,r,"input")&&(n[i]=r);this._inputMap=n}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 t=e,n=[],i=e.length,r=0,o=0,a=this._maxTotalExpansions>0,l=this._maxExpandedLength>0,c=a||l;for(;o<i;){if(e.charCodeAt(o)!==38){o++;continue}let f=o+1;for(;f<i&&e.charCodeAt(f)!==59&&f-o<=32;)f++;if(f>=i||e.charCodeAt(f)!==59){o++;continue}let d=e.slice(o+1,f);if(d.length===0){o++;continue}let p,g;if(this._removeSet.has(d))p="",g===void 0&&(g=pe);else if(this._leaveSet.has(d)){o++;continue}else if(d.charCodeAt(0)===35){let h=this._resolveNCR(d);if(h===void 0){o++;continue}p=h,g=Ft}else{let h=this._resolveName(d);p=h?.value,g=h?.tier}if(p===void 0){o++;continue}if(o>r&&n.push(e.slice(r,o)),n.push(p),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 h=p.length-(d.length+2);if(h>0&&(this._expandedLength+=h,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}r<i&&n.push(e.slice(r));let u=n.length===0?e:n.join("");return this._postCheck(u,t)}_tierCounts(e){return this._limitTiers.has(sn)?!0:this._limitTiers.has(e)}_resolveName(e){if(e in this._inputMap)return{value:this._inputMap[e],tier:pe};if(e in this._externalMap)return{value:this._externalMap[e],tier:pe};if(e in this._baseMap)return{value:this._baseMap[e],tier:Ft}}_classifyNCR(e){return e===0?this._ncrNullLevel:e>=55296&&e<=57343||this._ncrXmlVersion===1&&e>=1&&e<=31&&!Tc.has(e)?$.remove:-1}_applyNCRAction(e,t,n){switch(e){case $.allow:return String.fromCodePoint(n);case $.remove:return"";case $.leave:return;case $.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${t}; (U+${n.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(n)}}_resolveNCR(e){let t=e.charCodeAt(1),n;if(t===120||t===88?n=parseInt(e.slice(2),16):n=parseInt(e.slice(1),10),Number.isNaN(n)||n<0||n>1114111)return;let i=this._classifyNCR(n);if(!this._numericAllowed&&i<$.remove)return;let r=i===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,i);return this._applyNCRAction(r,e,n)}};var Mr=s=>Ye.includes(s)?"__"+s:s,kc={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(s,e){return e},attributeValueProcessor:function(s,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(s,e,t){return s},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:Mr};function xc(s,e){if(typeof s!="string")return;let t=s.toLowerCase();if(Ye.some(n=>t===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${s}" is a reserved JavaScript keyword that could cause prototype pollution`);if(Rt.some(n=>t===n.toLowerCase()))throw new Error(`[SECURITY] Invalid ${e}: "${s}" is a reserved JavaScript keyword that could cause prototype pollution`)}function $r(s,e){return typeof s=="boolean"?{enabled:s,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof s=="object"&&s!==null?{enabled:s.enabled!==!1,maxEntitySize:Math.max(1,s.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,s.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,s.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,s.maxExpandedLength??1e5),maxEntityCount:Math.max(1,s.maxEntityCount??1e3),allowedTags:s.allowedTags??null,tagFilter:s.tagFilter??null,appliesTo:s.appliesTo??"all"}:$r(!0)}var Rr=function(s){let e=Object.assign({},kc,s),t=[{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:n,name:i}of t)n&&xc(n,i);return e.onDangerousProperty===null&&(e.onDangerousProperty=Mr),e.processEntities=$r(e.processEntities,e.htmlEntities),e.unpairedTagsSet=new Set(e.unpairedTags),e.stopNodes&&Array.isArray(e.stopNodes)&&(e.stopNodes=e.stopNodes.map(n=>typeof n=="string"&&n.startsWith("*.")?".."+n.substring(2):n)),e};var jt;typeof Symbol!="function"?jt="@@xmlMetadata":jt=Symbol("XML Node Metadata");var R=class{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][jt]={startIndex:t})}static getMetaDataSymbol(){return jt}};var jr=":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",Oc=jr+"\\-\\.\\d\xB7\u0300-\u036F\u203F-\u2040",Br=":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}",Lc=Br+"\\-\\.\\d\xB7\u0300-\u036F\u0487\u203F-\u2040",nn=(s,e,t="")=>{let n=s.replace(":",""),i=e.replace(":",""),r=`[${n}][${i}]*`;return{name:new RegExp(`^[${s}][${e}]*$`,t),ncName:new RegExp(`^${r}$`,t),qName:new RegExp(`^${r}(?::${r})?$`,t),nmToken:new RegExp(`^[${e}]+$`,t),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,t)}},Ic=nn(jr,Oc),_c=nn(Br,Lc,"u"),Dr=":A-Za-z_",qc=Dr+"\\-\\.\\d",Pc=nn(Dr,qc),Vr=(s="1.0",e=!1)=>e?Pc:s==="1.1"?_c:Ic;var rn=(s,{xmlVersion:e="1.0",asciiOnly:t=!1}={})=>Vr(e,t).qName.test(s);var Fr=["name","ncName","qName","nmToken","nmTokens"],Bt=(s,{xmlVersion:e="1.0",asciiOnly:t=!1,maxCacheSize:n=2048}={})=>{if(!Fr.includes(s))throw new TypeError(`Unknown production "${s}". Must be one of: ${Fr.join(", ")}`);let i=Vr(e,t)[s],r=new Map,o=a=>{let l=r.get(a);if(l!==void 0)return l;let c=i.test(a);return r.size<n&&r.set(a,c),c};return o.reset=()=>{r=new Map},o};var Xe=class{constructor(e,t){this.suppressValidationErr=!e,this.options=e,this.xmlVersion=t||1}setXmlVersion(e=1){this.xmlVersion=e}readDocType(e,t){let n=Object.create(null),i=0;if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let r=1,o=!1,a=!1,l="";for(;t<e.length;t++)if(e[t]==="<"&&!a){if(o&&me(e,"!ENTITY",t)){t+=7;let c,u;if([c,u,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),u.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&i>=this.options.maxEntityCount)throw new Error(`Entity count (${i+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);n[c]=u,i++}}else if(o&&me(e,"!ELEMENT",t)){t+=8;let{index:c}=this.readElementExp(e,t+1);t=c}else if(o&&me(e,"!ATTLIST",t))t+=8;else if(o&&me(e,"!NOTATION",t)){t+=9;let{index:c}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=c}else if(me(e,"!--",t))a=!0;else throw new Error("Invalid DOCTYPE");r++,l=""}else if(e[t]===">"){if(a?e[t-1]==="-"&&e[t-2]==="-"&&(a=!1,r--):r--,r===0)break}else e[t]==="["?o=!0:l+=e[t];if(r!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:t}}readEntityExp(e,t){t=F(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!=='"'&&e[t]!=="'";)t++;let i=e.substring(n,t);if(We(i,{xmlVersion:this.xmlVersion}),t=F(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[t]==="%")throw new Error("Parameter entities are not supported")}let r="";if([t,r]=this.readIdentifierVal(e,t,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&r.length>this.options.maxEntitySize)throw new Error(`Entity "${i}" size (${r.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[i,r,t]}readNotationExp(e,t){t=F(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);!this.suppressValidationErr&&We(i,{xmlVersion:this.xmlVersion}),t=F(e,t);let r=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&r!=="SYSTEM"&&r!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);t+=r.length,t=F(e,t);let o=null,a=null;if(r==="PUBLIC")[t,o]=this.readIdentifierVal(e,t,"publicIdentifier"),t=F(e,t),(e[t]==='"'||e[t]==="'")&&([t,a]=this.readIdentifierVal(e,t,"systemIdentifier"));else if(r==="SYSTEM"&&([t,a]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!a))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:i,publicIdentifier:o,systemIdentifier:a,index:--t}}readIdentifierVal(e,t,n){let i="",r=e[t];if(r!=='"'&&r!=="'")throw new Error(`Expected quoted string, found "${r}"`);t++;let o=t;for(;t<e.length&&e[t]!==r;)t++;if(i=e.substring(o,t),e[t]!==r)throw new Error(`Unterminated ${n} value`);return t++,[t,i]}readElementExp(e,t){t=F(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);if(!this.suppressValidationErr&&!rn(i,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid element name: "${i}"`);t=F(e,t);let r="";if(e[t]==="E"&&me(e,"MPTY",t))t+=4;else if(e[t]==="A"&&me(e,"NY",t))t+=2;else if(e[t]==="("){t++;let o=t;for(;t<e.length&&e[t]!==")";)t++;if(r=e.substring(o,t),e[t]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:i,contentModel:r.trim(),index:t}}readAttlistExp(e,t){t=F(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);for(We(i,{xmlVersion:this.xmlVersion}),t=F(e,t),n=t;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);if(!We(r,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid attribute name: "${r}"`);t=F(e,t);let o="";if(e.substring(t,t+8).toUpperCase()==="NOTATION"){if(o="NOTATION",t+=8,t=F(e,t),e[t]!=="(")throw new Error(`Expected '(', found "${e[t]}"`);t++;let l=[];for(;t<e.length&&e[t]!==")";){let c=t;for(;t<e.length&&e[t]!=="|"&&e[t]!==")";)t++;let u=e.substring(c,t);if(u=u.trim(),!We(u,{xmlVersion:this.xmlVersion}))throw new Error(`Invalid notation name: "${u}"`);l.push(u),e[t]==="|"&&(t++,t=F(e,t))}if(e[t]!==")")throw new Error("Unterminated list of notations");t++,o+=" ("+l.join("|")+")"}else{let l=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;o+=e.substring(l,t);let c=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!c.includes(o.toUpperCase()))throw new Error(`Invalid attribute type: "${o}"`)}t=F(e,t);let a="";return e.substring(t,t+8).toUpperCase()==="#REQUIRED"?(a="#REQUIRED",t+=8):e.substring(t,t+7).toUpperCase()==="#IMPLIED"?(a="#IMPLIED",t+=7):[t,a]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:i,attributeName:r,attributeType:o,defaultValue:a,index:t}}},F=(s,e)=>{for(;e<s.length&&/\s/.test(s[e]);)e++;return e};function me(s,e,t){for(let n=0;n<e.length;n++)if(e[n]!==s[t+n+1])return!1;return!0}function We(s,e){if(rn(s,{xmlVersion:e}))return s;throw new Error(`Invalid entity name ${s}`)}var Mc=[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],Dt=255,Vt=new Map,Ur=65535,Kr=1632,Ce=Kr,$c=Ur-Kr+1,Ut=new Uint8Array($c).fill(Dt);for(let s of Mc)for(let e=0;e<10;e++){let t=s+e;t<=Ur?Ut[t-Ce]=e:Vt.set(t,e)}var Yr=48,Gr=57,Hr=45,Kt=new Set([8722,65293,65123]);function Rc(s){if(typeof s!="string")return s;let e=s.length;if(e===0)return s;let t=-1;for(let i=0;i<e;i++){let r=s.charCodeAt(i);if(!(r>=Yr&&r<=Gr||r===Hr)){if(r<Ce){if(Kt.has(r)){t=i;break}continue}if(r>=55296&&r<=56319){if(i+1<e){let o=s.charCodeAt(i+1);if(o>=56320&&o<=57343){let a=65536+(r-55296<<10)+(o-56320);if(Vt.has(a)){t=i;break}}}continue}if(Ut[r-Ce]!==Dt||Kt.has(r)){t=i;break}}}if(t===-1)return s;let n=[];t>0&&n.push(s.slice(0,t));for(let i=t;i<e;i++){let r=s.charCodeAt(i);if(r>=Yr&&r<=Gr||r===Hr){n.push(s[i]);continue}if(r<Ce){n.push(Kt.has(r)?"-":s[i]);continue}if(r>=55296&&r<=56319){if(i+1<e){let a=s.charCodeAt(i+1);if(a>=56320&&a<=57343){let l=65536+(r-55296<<10)+(a-56320),c=Vt.get(l);if(c!==void 0){n.push(String.fromCharCode(c+48)),i++;continue}}}n.push(s[i]);continue}if(Kt.has(r)){n.push("-");continue}let o=Ut[r-Ce];n.push(o!==Dt?String.fromCharCode(o+48):s[i])}return n.join("")}var Jr=Rc;var Fc=/^[-+]?0x[a-fA-F0-9]+$/,jc=/^0b[01]+$/,Bc=/^0o[0-7]+$/,Dc=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Vc={hex:!0,binary:!1,octal:!1,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original",unicode:!1};function an(s,e={}){if(e=Object.assign({},Vc,e),!s||typeof s!="string")return s;let t=s.trim();if(t.length===0)return s;if(e.skipLike!==void 0&&e.skipLike.test(t))return s;if(t==="0"||e.unicode&&(t=Jr(t),t==="0"))return 0;if(e.hex&&Fc.test(t))return on(t,16);if(e.binary&&jc.test(t))return on(t,2);if(e.octal&&Bc.test(t))return on(t,8);if(isFinite(t)){if(t.includes("e")||t.includes("E"))return Kc(s,t,e);{let n=Dc.exec(t);if(n){let i=n[1]||"",r=n[2],o=Yc(n[3]),a=i?s[r.length+1]===".":s[r.length]===".";if(!e.leadingZeros&&(r.length>1||r.length===1&&!a))return s;{let l=Number(t),c=String(l);if(l===0)return l;if(c.search(/[eE]/)!==-1)return e.eNotation?l:s;if(t.indexOf(".")!==-1)return c==="0"||c===o||c===`${i}${o}`?l:s;let u=r?o:t;return r?u===c||i+u===c?l:s:u===c||u===i+c?l:s}}else return s}}else return Gc(s,Number(t),e)}var Uc=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Kc(s,e,t){if(!t.eNotation)return s;let n=e.match(Uc);if(n){let i=n[1]||"",r=n[3].indexOf("e")===-1?"E":"e",o=n[2],a=i?s[o.length+1]===r:s[o.length]===r;return o.length>1&&a?s:o.length===1&&(n[3].startsWith(`.${r}`)||n[3][0]===r)?Number(e):o.length>0?t.leadingZeros&&!a?(e=(n[1]||"")+n[3],Number(e)):s:Number(e)}else return s}function Yc(s){return s&&s.indexOf(".")!==-1&&(s=s.replace(/0+$/,""),s==="."?s="0":s[0]==="."?s="0"+s:s[s.length-1]==="."&&(s=s.substring(0,s.length-1))),s}function on(s,e){let t=s.trim();if((e===2||e===8)&&(s=t.substring(2)),parseInt)return parseInt(s,e);if(Number.parseInt)return Number.parseInt(s,e);if(window&&window.parseInt)return window.parseInt(s,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Gc(s,e,t){let n=e===1/0;switch(t.infinity.toLowerCase()){case"null":return null;case"infinity":return e;case"string":return n?"Infinity":"-Infinity";default:return s}}function ln(s){return typeof s=="function"?s:Array.isArray(s)?e=>{for(let t of s)if(typeof t=="string"&&e===t||t instanceof RegExp&&t.test(e))return!0}:()=>!1}var V=class{constructor(e,t={},n){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this.data=n,this._hasDeepWildcard=this.segments.some(i=>i.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(i=>i.attrName!==void 0),this._hasPositionSelector=this.segments.some(i=>i.position!==void 0)}_parse(e){let t=[],n=0,i="";for(;n<e.length;)e[n]===this.separator?n+1<e.length&&e[n+1]===this.separator?(i.trim()&&(t.push(this._parseSegment(i.trim())),i=""),t.push({type:"deep-wildcard"}),n+=2):(i.trim()&&t.push(this._parseSegment(i.trim())),i="",n++):(i+=e[n],n++);return i.trim()&&t.push(this._parseSegment(i.trim())),t}_parseSegment(e){let t={type:"tag"},n=null,i=e,r=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(r&&(i=r[1]+r[3],r[2])){let u=r[2].slice(1,-1);u&&(n=u)}let o,a=i;if(i.includes("::")){let u=i.indexOf("::");if(o=i.substring(0,u).trim(),a=i.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(t.tag=l,o&&(t.namespace=o),n)if(n.includes("=")){let u=n.indexOf("=");t.attrName=n.substring(0,u).trim(),t.attrValue=n.substring(u+1).trim()}else t.attrName=n.trim();if(c){let u=c.match(/^nth\((\d+)\)$/);u?(t.position="nth",t.positionValue=parseInt(u[1],10)):t.position=c}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}};var ke=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 t=e.length,i=e.segments[e.segments.length-1]?.tag;if(!i||i==="*")this._wildcardByDepth.has(t)||this._wildcardByDepth.set(t,[]),this._wildcardByDepth.get(t).push(e);else{let r=`${t}:${i}`;this._byDepthAndTag.has(r)||this._byDepthAndTag.set(r,[]),this._byDepthAndTag.get(r).push(e)}return this}addAll(e){for(let t of e)this.add(t);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 t=e.getDepth(),n=e.getCurrentTag(),i=`${t}:${n}`,r=this._byDepthAndTag.get(i);if(r){for(let l=0;l<r.length;l++)if(e.matches(r[l]))return r[l]}let o=this._wildcardByDepth.get(t);if(o){for(let l=0;l<o.length;l++)if(e.matches(o[l]))return o[l]}let a=this._deepByTerminalTag.get(n);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 cn=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 t=this._matcher.path;if(t.length!==0)return t[t.length-1].values?.[e]}hasAttr(e){let t=this._matcher.path;if(t.length===0)return!1;let n=t[t.length-1];return n.values!==void 0&&e in n.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,t=!0){return this._matcher.toString(e,t)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}},W=class{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new cn(this),this._keptAttrs=[]}push(e,t=null,n=null,i=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=n?`${n}:${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};n!=null&&(u.namespace=n),t!=null&&(u.values=t),this.path.push(u);let f=this.path.length,d=i!==null?i.keep:null;if(d!=null&&d.length>0&&t)for(let p=0;p<d.length;p++){let g=d[p];t[g]!==void 0&&this._keptAttrs.push({depth:f,name:g,value:t[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 t=this.path.length+1;for(;this._keptAttrs.length>0&&this._keptAttrs[this._keptAttrs.length-1].depth>=t;)this._keptAttrs.pop();return e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.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 t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getAnyParentAttr(e){let t=this._keptAttrs;for(let n=t.length-1;n>=0;n--)if(t[n].name===e)return t[n].value}hasAnyParentAttr(e){let t=this._keptAttrs;for(let n=t.length-1;n>=0;n--)if(t[n].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,t=!0){let n=e||this.separator;if(n===this.separator&&t===!0){if(this._pathStringCache!==null)return this._pathStringCache;let r=this.path.map(o=>o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(n);return this._pathStringCache=r,r}return this.path.map(r=>t&&r.namespace?`${r.namespace}:${r.tag}`:r.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[],this._keptAttrs=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++)if(!this._matchSegment(e[t],this.path[t],t===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,n=e.length-1;for(;n>=0&&t>=0;){let i=e[n];if(i.type==="deep-wildcard"){if(n--,n<0)return!0;let r=e[n],o=!1;for(let a=t;a>=0;a--)if(this._matchSegment(r,this.path[a],a===this.path.length-1)){t=a-1,n--,o=!0;break}if(!o)return!1}else{if(!this._matchSegment(i,this.path[t],t===this.path.length-1))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!=="*"&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==t.namespace||e.attrName!==void 0&&(!n||!t.values||!(e.attrName in t.values)||e.attrValue!==void 0&&String(t.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!n)return!1;let i=t.counter??0;if(e.position==="first"&&i!==0)return!1;if(e.position==="odd"&&i%2!==1)return!1;if(e.position==="even"&&i%2!==0)return!1;if(e.position==="nth"&&i!==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(t=>({...t})),this.siblingStacks=e.siblingStacks.map(t=>t&&{counts:new Map(t.counts),total:t.total}),this._keptAttrs=(e.keptAttrs||[]).map(t=>({...t}))}readOnly(){return this._view}};var Hc=[{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}],xe=Hc;var Jc=[{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:/\?>/}],Oe=Jc;var Wc=[{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}],un=Wc;var Xc=[{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}],ze=Xc;var zc=[{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}],fn=zc;var Qc=[{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,}\)/}],dn=Qc;var U=`["'\\s]*:`,Zc=[{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__["']\]/}],hn=Zc;var eu=[{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\[/}],pn=eu;var tu=[{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}],su=[...ze,...tu],mn=su;xe.label="HTML";Oe.label="XML";un.label="SVG";ze.label="SQL";mn.label="SQL-STRICT";fn.label="SHELL";dn.label="REDOS";hn.label="NOSQL";pn.label="LOG";var $g=Object.freeze({HTML:xe,XML:Oe,SVG:un,SQL:ze,"SQL-STRICT":mn,SHELL:fn,REDOS:dn,NOSQL:hn,LOG:pn});function nu(s){if(typeof s!="string")throw new TypeError(`is-unsafe: first argument must be a string, got ${typeof s}`)}function iu(s){if(!(s instanceof RegExp)){if(Array.isArray(s)){if(s.length===0)throw new TypeError("is-unsafe: context must not be an empty array");if(Array.isArray(s[0])){for(let e of s)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 s}`)}}function ru(s){return s instanceof RegExp?{lists:null,regex:s}:Array.isArray(s[0])?{lists:s,regex:null}:{lists:[s],regex:null}}function ou(s,e){let t=e.label??"CUSTOM";for(let n of e)if(n.pattern.test(s))return{context:t,id:n.id,description:n.description,pattern:n.pattern};return null}function Wr(s,e){nu(s),iu(e);let{lists:t,regex:n}=ru(e);if(n)return n.test(s);for(let i of t)if(ou(s,i)!==null)return!0;return!1}function au(s,e){if(!s)return{};let t=e.attributesGroupName?s[e.attributesGroupName]:s;if(!t)return{};let n={};for(let i in t)if(i.startsWith(e.attributeNamePrefix)){let r=i.substring(e.attributeNamePrefix.length);n[r]=t[i]}else n[i]=t[i];return n}function lu(s){if(!s||typeof s!="string")return;let e=s.indexOf(":");if(e!==-1&&e>0){let t=s.substring(0,e);if(t!=="xmlns")return t}}var Qe=class{constructor(e,t){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=hu,this.parseTextData=cu,this.resolveNameSpace=uu,this.buildAttributesMap=du,this.isItStopNode=yu,this.replaceEntitiesValue=mu,this.readStopNodeData=Su,this.saveTextToParentTag=gu,this.addChild=pu,this.ignoreAttributesFn=ln(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.doctypefound=!1;let n={...He};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?n=this.options.htmlEntities:this.options.htmlEntities===!0&&(n={...tn,...en}),this.entityDecoder=new Te({namedEntities:{...n,...t},numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo},onInputEntity:(r,o)=>Wr(o,[xe,Oe])?ve.BLOCK:ve.ALLOW})),this.matcher=new W,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new ke;let i=this.options.stopNodes;if(i&&i.length>0){for(let r=0;r<i.length;r++){let o=i[r];typeof o=="string"?this.stopNodeExpressionsSet.add(new V(o)):o instanceof V&&this.stopNodeExpressionsSet.add(o)}this.stopNodeExpressionsSet.seal()}}};function cu(s,e,t,n,i,r,o){let a=this.options;if(s!==void 0&&(a.trimValues&&!n&&(s=s.trim()),s.length>0)){o||(s=this.replaceEntitiesValue(s,e,t));let l=a.jPath?t.toString():t,c=a.tagValueProcessor(e,s,l,i,r);return c==null?s:typeof c!=typeof s||c!==s?c:a.trimValues||s.trim()===s?bn(s,a.parseTagValue,a.numberParseOptions):s}}function uu(s){if(this.options.removeNSPrefix){let e=s.split(":"),t=s.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(s=t+e[1])}return s}var fu=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function du(s,e,t,n=!1){let i=this.options;if(n===!0||i.ignoreAttributes!==!0&&typeof s=="string"){let r=$t(s,fu),o=r.length,a={},l=new Array(o),c=!1,u={};for(let p=0;p<o;p++){let g=this.resolveNameSpace(r[p][1]),h=r[p][4];if(g.length&&h!==void 0){let m=h;i.trimValues&&(m=m.trim()),m=this.replaceEntitiesValue(m,t,this.readonlyMatcher),l[p]=m,u[g]=m,c=!0}}c&&typeof e=="object"&&e.updateCurrent&&e.updateCurrent(u);let f=i.jPath?e.toString():this.readonlyMatcher,d=!1;for(let p=0;p<o;p++){let g=this.resolveNameSpace(r[p][1]);if(this.ignoreAttributesFn(g,f))continue;let h=i.attributeNamePrefix+g;if(g.length)if(i.transformAttributeName&&(h=i.transformAttributeName(h)),h=Xr(h,i),r[p][4]!==void 0){let m=l[p],b=i.attributeValueProcessor(g,m,f);b==null?a[h]=m:typeof b!=typeof m||b!==m?a[h]=b:a[h]=bn(m,i.parseAttributeValue,i.numberParseOptions),d=!0}else i.allowBooleanAttributes&&(a[h]=!0,d=!0)}if(!d)return;if(i.attributesGroupName&&!i.preserveOrder){let p={};return p[i.attributesGroupName]=a,p}return a}}var hu=function(s){s=s.replace(/\r\n?/g,`
|
|
145
|
-
`);let e=new R("!xml"),t=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0,this.doctypefound=!1;let i=this.options,r=new Xe(i.processEntities),o=s.length;for(let a=0;a<o;a++)if(s[a]==="<"){let c=s.charCodeAt(a+1);if(c===47){let u=Le(s,">",a,"Closing Tag is not closed."),f=s.substring(a+2,u).trim();if(i.removeNSPrefix){let p=f.indexOf(":");p!==-1&&(f=f.substr(p+1))}f=gn(i.transformTagName,f,"",i).tagName,t&&(n=this.saveTextToParentTag(n,t,this.readonlyMatcher));let d=this.matcher.getCurrentTag();if(f&&i.unpairedTagsSet.has(f))throw new Error(`Unpaired tag can not be used as closing tag: </${f}>`);d&&i.unpairedTagsSet.has(d)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,t=this.tagsNodeStack.pop(),n="",a=u}else if(c===63){let u=yn(s,a,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,t,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(!(i.ignoreDeclaration&&u.tagName==="?xml"||i.ignorePiTags)){let d=new R(u.tagName);d.add(i.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&i.ignoreAttributes!==!0&&(d[":@"]=f),this.addChild(t,d,this.readonlyMatcher,a)}a=u.closeIndex+1}else if(c===33&&s.charCodeAt(a+2)===45&&s.charCodeAt(a+3)===45){let u=Le(s,"-->",a+4,"Comment is not closed.");if(i.commentPropName){let f=s.substring(a+4,u-2);n=this.saveTextToParentTag(n,t,this.readonlyMatcher),t.add(i.commentPropName,[{[i.textNodeName]:f}])}a=u}else if(c===33&&s.charCodeAt(a+2)===68){if(this.doctypefound)throw new Error("Multiple DOCTYPE declarations found.");this.doctypefound=!0;let u=r.readDocType(s,a);this.entityDecoder.addInputEntities(u.entities),a=u.i}else if(c===33&&s.charCodeAt(a+2)===91){let u=Le(s,"]]>",a,"CDATA is not closed.")-2,f=s.substring(a+9,u);n=this.saveTextToParentTag(n,t,this.readonlyMatcher);let d=this.parseTextData(f,t.tagname,this.readonlyMatcher,!0,!1,!0,!0);d==null&&(d=""),i.cdataPropName?t.add(i.cdataPropName,[{[i.textNodeName]:f}]):t.add(i.textNodeName,d),a=u+2}else{let u=yn(s,a,i.removeNSPrefix);if(!u){let E=s.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,p=u.tagExp,g=u.attrExpPresent,h=u.closeIndex;if({tagName:f,tagExp:p}=gn(i.transformTagName,f,p,i),i.strictReservedNames&&(f===i.commentPropName||f===i.cdataPropName||f===i.textNodeName||f===i.attributesGroupName))throw new Error(`Invalid tag name: ${f}`);t&&n&&t.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,t,this.readonlyMatcher,!1));let m=t;m&&i.unpairedTagsSet.has(m.tagname)&&(t=this.tagsNodeStack.pop(),this.matcher.pop());let b=!1;p.length>0&&p.lastIndexOf("/")===p.length-1&&(b=!0,f[f.length-1]==="/"?(f=f.substr(0,f.length-1),p=f):p=p.substr(0,p.length-1),g=f!==p);let y=null,A={},S;S=lu(d),f!==e.tagname&&this.matcher.push(f,{},S),f!==p&&g&&(y=this.buildAttributesMap(p,this.matcher,f),y&&(A=au(y,i))),f!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let v=a;if(this.isCurrentNodeStopNode){let E="";if(b)a=u.closeIndex;else if(i.unpairedTagsSet.has(f))a=u.closeIndex;else{let N=this.readStopNodeData(s,d,h+1);if(!N)throw new Error(`Unexpected end of ${d}`);a=N.i,E=N.tagContent}let C=new R(f);y&&(C[":@"]=y),C.add(i.textNodeName,E),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(t,C,this.readonlyMatcher,v)}else{if(b){({tagName:f,tagExp:p}=gn(i.transformTagName,f,p,i));let E=new R(f);y&&(E[":@"]=y),this.addChild(t,E,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(f)){let E=new R(f);y&&(E[":@"]=y),this.addChild(t,E,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=u.closeIndex;continue}else{let E=new R(f);if(this.tagsNodeStack.length>i.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(t),y&&(E[":@"]=y),this.addChild(t,E,this.readonlyMatcher,v),t=E}n="",a=h}}}else n+=s[a];return e.child};function pu(s,e,t,n){this.options.captureMetaData||(n=void 0);let i=this.options.jPath?t.toString():t,r=this.options.updateTag(e.tagname,i,e[":@"]);r===!1||(typeof r=="string"&&(e.tagname=r),s.addChild(e,n))}function mu(s,e,t){let n=this.options.processEntities;if(!n||!n.enabled)return s;if(n.allowedTags){let i=this.options.jPath?t.toString():t;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,i)))return s}if(n.tagFilter){let i=this.options.jPath?t.toString():t;if(!n.tagFilter(e,i))return s}return this.entityDecoder.decode(s)}function gu(s,e,t,n){return s&&(n===void 0&&(n=e.child.length===0),s=this.parseTextData(s,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),s!==void 0&&s!==""&&e.add(this.options.textNodeName,s),s=""),s}function yu(){return this.stopNodeExpressionsSet.size===0?!1:this.matcher.matchesAny(this.stopNodeExpressionsSet)}function bu(s,e,t=">"){let n=0,i=s.length,r=t.charCodeAt(0),o=t.length>1?t.charCodeAt(1):-1,a="",l=e;for(let c=e;c<i;c++){let u=s.charCodeAt(c);if(n)u===n&&(n=0);else if(u===34||u===39)n=u;else if(u===r)if(o!==-1){if(s.charCodeAt(c+1)===o)return a+=s.substring(l,c),{data:a,index:c}}else return a+=s.substring(l,c),{data:a,index:c};else u===9&&!n&&(a+=s.substring(l,c)+" ",l=c+1)}}function Le(s,e,t,n){let i=s.indexOf(e,t);if(i===-1)throw new Error(n);return i+e.length-1}function wu(s,e,t,n){let i=s.indexOf(e,t);if(i===-1)throw new Error(n);return i}function yn(s,e,t,n=">"){let i=bu(s,e+1,n);if(!i)return;let r=i.data,o=i.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(t){let f=l.indexOf(":");f!==-1&&(l=l.substr(f+1),c=l!==i.data.substr(f+1))}return{tagName:l,tagExp:r,closeIndex:o,attrExpPresent:c,rawTagName:u}}function Su(s,e,t){let n=t,i=1,r=s.length;for(;t<r;t++)if(s[t]==="<"){let o=s.charCodeAt(t+1);if(o===47){let a=wu(s,">",t,`${e} is not closed`);if(s.substring(t+2,a).trim()===e&&(i--,i===0))return{tagContent:s.substring(n,t),i:a};t=a}else if(o===63)t=Le(s,"?>",t+1,"StopNode is not closed.");else if(o===33&&s.charCodeAt(t+2)===45&&s.charCodeAt(t+3)===45)t=Le(s,"-->",t+3,"StopNode is not closed.");else if(o===33&&s.charCodeAt(t+2)===91)t=Le(s,"]]>",t,"StopNode is not closed.")-2;else{let a=yn(s,t,!1);a&&((a&&a.tagName)===e&&a.tagExp[a.tagExp.length-1]!=="/"&&i++,t=a.closeIndex)}}}function bn(s,e,t){if(e&&typeof s=="string"){let n=s.trim();return n==="true"?!0:n==="false"?!1:an(s,t)}else return xr(s)?s:""}function gn(s,e,t,n){if(s){let i=s(e);t===e&&(t=i),e=i}return e=Xr(e,n),{tagName:e,tagExp:t}}function Xr(s,e){if(Rt.includes(s))throw new Error(`[SECURITY] Invalid name: "${s}" is a reserved JavaScript keyword that could cause prototype pollution`);return Ye.includes(s)?e.onDangerousProperty(s):s}var wn=R.getMetaDataSymbol();function Nu(s,e){if(!s||typeof s!="object")return{};if(!e)return s;let t={};for(let n in s)if(n.startsWith(e)){let i=n.substring(e.length);t[i]=s[n]}else t[n]=s[n];return t}function Sn(s,e,t,n){return zr(s,e,t,n)}function zr(s,e,t,n){let i,r={};for(let o=0;o<s.length;o++){let a=s[o],l=Au(a);if(l!==void 0&&l!==e.textNodeName){let c=Nu(a[":@"]||{},e.attributeNamePrefix);t.push(l,c)}if(l===e.textNodeName)i===void 0?i=a[l]:i+=""+a[l];else{if(l===void 0)continue;if(a[l]){let c=zr(a[l],e,t,n),u=vu(c,e);if(Object.keys(c).length===0&&e.alwaysCreateTextNode&&(c[e.textNodeName]=""),a[":@"]?Eu(c,a[":@"],n,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[wn]!==void 0&&typeof c=="object"&&c!==null&&(c[wn]=a[wn]),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?n.toString():n;e.isArray(l,f,u)?r[l]=[c]:r[l]=c}l!==void 0&&l!==e.textNodeName&&t.pop()}}}return typeof i=="string"?i.length>0&&(r[e.textNodeName]=i):i!==void 0&&(r[e.textNodeName]=i),r}function Au(s){let e=Object.keys(s);for(let t=0;t<e.length;t++){let n=e[t];if(n!==":@")return n}}function Eu(s,e,t,n){if(e){let i=Object.keys(e),r=i.length;for(let o=0;o<r;o++){let a=i[o],l=a.startsWith(n.attributeNamePrefix)?a.substring(n.attributeNamePrefix.length):a,c=n.jPath?t.toString()+"."+l:t;n.isArray(a,c,!0,!0)?s[a]=[e[a]]:s[a]=e[a]}}}function vu(s,e){let{textNodeName:t}=e,n=Object.keys(s).length;return!!(n===0||n===1&&(s[t]||typeof s[t]=="boolean"||s[t]===0))}var Ie=class{constructor(e){this.externalEntities={},this.options=Rr(e)}parse(e,t){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(t){t===!0&&(t={});let r=qr(e,t);if(r!==!0)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}let n=new Qe(this.options,this.externalEntities),i=n.parseXml(e);return this.options.preserveOrder||i===void 0?i:Sn(i,this.options,n.matcher,n.readonlyMatcher)}addEntity(e,t){if(t.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(t==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return R.getMetaDataSymbol()}};function Ze(s){return String(s).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function Yt(s){return String(s).replace(/\]\]>/g,"]]]]><![CDATA[>")}function X(s){return String(s).replace(/"/g,""").replace(/'/g,"'")}var Tu=`
|
|
146
|
-
`;function Cu(s,e){if(!Array.isArray(s)||s.length===0)return"1.0";let t=s[0];if(En(t)==="?xml"){let i=t[":@"];if(i){let r=e.attributeNamePrefix+"version";if(i[r])return i[r]}}return"1.0"}function Zr(s,e,t,n,i){return!t.sanitizeName||i(s)?s:t.sanitizeName(s,{isAttribute:e,matcher:n.readOnly()})}function An(s,e){let t="";e.format&&(t=Tu);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let l=e.stopNodes[a];typeof l=="string"?n.push(new V(l)):l instanceof V&&n.push(l)}let i=Cu(s,e),r=Bt("qName",{xmlVersion:i}),o=new W;return eo(s,e,t,o,n,r)}function eo(s,e,t,n,i,r){let o="",a=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(s)){if(s!=null){let l=s.toString();return l=Nn(l,e),l}return""}for(let l=0;l<s.length;l++){let c=s[l],u=En(c);if(u===void 0)continue;let d=u===e.textNodeName||u===e.cdataPropName||u===e.commentPropName||u[0]==="?"?u:Zr(u,!1,e,n,r),p=ku(c[":@"],e);n.push(d,p);let g=Ou(n,i);if(d===e.textNodeName){let A=c[u];g||(A=e.tagValueProcessor(d,A),A=Nn(A,e)),a&&(o+=t),o+=A,a=!1,n.pop();continue}else if(d===e.cdataPropName){a&&(o+=t);let A=c[u][0][e.textNodeName],S=Yt(A);o+=`<![CDATA[${S}]]>`,a=!1,n.pop();continue}else if(d===e.commentPropName){let A=c[u][0][e.textNodeName],S=Ze(A);o+=t+`<!--${S}-->`,a=!0,n.pop();continue}else if(d[0]==="?"){let A=Qr(c[":@"],e,g,n,r);o+=(d==="?xml"?"":t)+`<${d}${A}?>`,a=!0,n.pop();continue}let h=t;h!==""&&(h+=e.indentBy);let m=Qr(c[":@"],e,g,n,r),b=t+`<${d}${m}`,y;g?y=to(c[u],e):y=eo(c[u],e,h,n,i,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}${t}</${d}>`:(o+=b+">",y&&t!==""&&(y.includes("/>")||y.includes("</"))?o+=t+e.indentBy+y+t:o+=y,o+=`</${d}>`),a=!0,n.pop()}return o}function ku(s,e){if(!s||e.ignoreAttributes)return null;let t={},n=!1;for(let i in s){if(!Object.prototype.hasOwnProperty.call(s,i))continue;let r=i.startsWith(e.attributeNamePrefix)?i.substr(e.attributeNamePrefix.length):i;t[r]=X(s[i]),n=!0}return n?t:null}function to(s,e){if(!Array.isArray(s))return s!=null?s.toString():"";let t="";for(let n=0;n<s.length;n++){let i=s[n],r=En(i);if(r===e.textNodeName)t+=i[r];else if(r===e.cdataPropName)t+=i[r][0][e.textNodeName];else if(r===e.commentPropName)t+=i[r][0][e.textNodeName];else{if(r&&r[0]==="?")continue;if(r){let o=xu(i[":@"],e),a=to(i[r],e);!a||a.length===0?t+=`<${r}${o}/>`:t+=`<${r}${o}>${a}</${r}>`}}}return t}function xu(s,e){let t="";if(s&&!e.ignoreAttributes)for(let n in s){if(!Object.prototype.hasOwnProperty.call(s,n))continue;let i=s[n];i===!0&&e.suppressBooleanAttributes?t+=` ${n.substr(e.attributeNamePrefix.length)}`:t+=` ${n.substr(e.attributeNamePrefix.length)}="${X(i)}"`}return t}function En(s){let e=Object.keys(s);for(let t=0;t<e.length;t++){let n=e[t];if(Object.prototype.hasOwnProperty.call(s,n)&&n!==":@")return n}}function Qr(s,e,t,n,i){let r="";if(s&&!e.ignoreAttributes)for(let o in s){if(!Object.prototype.hasOwnProperty.call(s,o))continue;let a=o.substr(e.attributeNamePrefix.length),l=t?a:Zr(a,!0,e,n,i),c;t?c=s[o]:(c=e.attributeValueProcessor(o,s[o]),c=Nn(c,e)),c===!0&&e.suppressBooleanAttributes?r+=` ${l}`:r+=` ${l}="${X(c)}"`}return r}function Ou(s,e){if(!e||e.length===0)return!1;for(let t=0;t<e.length;t++)if(s.matches(e[t]))return!0;return!1}function Nn(s,e){if(s&&s.length>0&&e.processEntities)for(let t=0;t<e.entities.length;t++){let n=e.entities[t];s=s.replace(n.regex,n.val)}return s}function vn(s){return typeof s=="function"?s:Array.isArray(s)?e=>{for(let t of s)if(typeof t=="string"&&e===t||t instanceof RegExp&&t.test(e))return!0}:()=>!1}var Lu={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(s,e){return e},attributeValueProcessor:function(s,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(s){if(this.options=Object.assign({},Lu,s),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 t=this.options.stopNodes[e];typeof t=="string"?this.stopNodeExpressions.push(new V(t)):t instanceof V&&this.stopNodeExpressions.push(t)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=vn(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Pu),this.processTextOrObjNode=_u,this.options.format?(this.indentate=qu,this.tagEndChar=`>
|
|
147
|
-
`,this.newLine=`
|
|
148
|
-
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Iu(s,e){let t=s["?xml"];if(t&&typeof t=="object"){if(e.attributesGroupName&&t[e.attributesGroupName]){let i=t[e.attributesGroupName][e.attributeNamePrefix+"version"];if(i)return i}let n=t[e.attributeNamePrefix+"version"];if(n)return n}return"1.0"}function Tn(s,e,t,n,i){return!t.sanitizeName||i(s)?s:t.sanitizeName(s,{isAttribute:e,matcher:n.readOnly()})}j.prototype.build=function(s){if(this.options.preserveOrder)return An(s,this.options);{Array.isArray(s)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(s={[this.options.arrayNodeName]:s});let e=new W,t=Iu(s,this.options),n=Bt("qName",{xmlVersion:t});return this.j2x(s,0,e,n).val}};j.prototype.j2x=function(s,e,t,n){let i="",r="";if(this.options.maxNestedTags&&t.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let o=this.options.jPath?t.toString():t,a=this.checkStopNode(t);for(let l in s){if(!Object.prototype.hasOwnProperty.call(s,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:Tn(l,!1,this.options,t,n);if(typeof s[l]>"u")this.isAttribute(l)&&(r+="");else if(s[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(s[l]instanceof Date)r+=this.buildTextValNode(s[l],u,"",e,t);else if(typeof s[l]!="object"){let f=this.isAttribute(l);if(f&&!this.ignoreAttributesFn(f,o)){let d=Tn(f,!0,this.options,t,n);i+=this.buildAttrPairStr(d,""+s[l],a)}else if(!f)if(l===this.options.textNodeName){let d=this.options.tagValueProcessor(l,""+s[l]);r+=this.replaceEntitiesValue(d)}else{t.push(u);let d=this.checkStopNode(t);if(t.pop(),d){let p=""+s[l];p===""?r+=this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:r+=this.indentate(e)+"<"+u+">"+p+"</"+u+this.tagEndChar}else r+=this.buildTextValNode(s[l],u,"",e,t)}}else if(Array.isArray(s[l])){let f=s[l].length,d="",p="";for(let g=0;g<f;g++){let h=s[l][g];if(!(typeof h>"u"))if(h===null)u[0]==="?"?r+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:r+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){t.push(u);let m=this.j2x(h,e+1,t,n);t.pop(),d+=m.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(p+=m.attrStr)}else d+=this.processTextOrObjNode(h,u,e,t,n);else if(this.options.oneListGroup){let m=this.options.tagValueProcessor(u,h);m=this.replaceEntitiesValue(m),d+=m}else{t.push(u);let m=this.checkStopNode(t);if(t.pop(),m){let b=""+h;b===""?d+=this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:d+=this.indentate(e)+"<"+u+">"+b+"</"+u+this.tagEndChar}else d+=this.buildTextValNode(h,u,"",e,t)}}this.options.oneListGroup&&(d=this.buildObjectNode(d,u,p,e)),r+=d}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){let f=Object.keys(s[l]),d=f.length;for(let p=0;p<d;p++){let g=Tn(f[p],!0,this.options,t,n);i+=this.buildAttrPairStr(g,""+s[l][f[p]],a)}}else r+=this.processTextOrObjNode(s[l],u,e,t,n)}return{attrStr:i,val:r}};j.prototype.buildAttrPairStr=function(s,e,t){return t||(e=this.options.attributeValueProcessor(s,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+s:" "+s+'="'+X(e)+'"'};function _u(s,e,t,n,i){let r=this.extractAttributes(s);if(n.push(e,r),this.checkStopNode(n)){let l=this.buildRawContent(s),c=this.buildAttributesForStopNode(s);return n.pop(),this.buildObjectNode(l,e,c,t)}let a=this.j2x(s,t+1,n,i);return n.pop(),e[0]==="?"?this.buildTextValNode("",e,a.attrStr,t,n):s[this.options.textNodeName]!==void 0&&Object.keys(s).length===1?this.buildTextValNode(s[this.options.textNodeName],e,a.attrStr,t,n):this.buildObjectNode(a.val,e,a.attrStr,t)}j.prototype.extractAttributes=function(s){if(!s||typeof s!="object")return null;let e={},t=!1;if(this.options.attributesGroupName&&s[this.options.attributesGroupName]){let n=s[this.options.attributesGroupName];for(let i in n){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let r=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i;e[r]=X(n[i]),t=!0}}else for(let n in s){if(!Object.prototype.hasOwnProperty.call(s,n))continue;let i=this.isAttribute(n);i&&(e[i]=X(s[n]),t=!0)}return t?e:null};j.prototype.buildRawContent=function(s){if(typeof s=="string")return s;if(typeof s!="object"||s===null)return String(s);if(s[this.options.textNodeName]!==void 0)return s[this.options.textNodeName];let e="";for(let t in s){if(!Object.prototype.hasOwnProperty.call(s,t)||this.isAttribute(t)||this.options.attributesGroupName&&t===this.options.attributesGroupName)continue;let n=s[t];if(t===this.options.textNodeName)e+=n;else if(Array.isArray(n)){for(let i of n)if(typeof i=="string"||typeof i=="number")e+=`<${t}>${i}</${t}>`;else if(typeof i=="object"&&i!==null){let r=this.buildRawContent(i),o=this.buildAttributesForStopNode(i);r===""?e+=`<${t}${o}/>`:e+=`<${t}${o}>${r}</${t}>`}}else if(typeof n=="object"&&n!==null){let i=this.buildRawContent(n),r=this.buildAttributesForStopNode(n);i===""?e+=`<${t}${r}/>`:e+=`<${t}${r}>${i}</${t}>`}else e+=`<${t}>${n}</${t}>`}return e};j.prototype.buildAttributesForStopNode=function(s){if(!s||typeof s!="object")return"";let e="";if(this.options.attributesGroupName&&s[this.options.attributesGroupName]){let t=s[this.options.attributesGroupName];for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let i=n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n,r=t[n];r===!0&&this.options.suppressBooleanAttributes?e+=" "+i:e+=" "+i+'="'+X(r)+'"'}}else for(let t in s){if(!Object.prototype.hasOwnProperty.call(s,t))continue;let n=this.isAttribute(t);if(n){let i=s[t];i===!0&&this.options.suppressBooleanAttributes?e+=" "+n:e+=" "+n+'="'+X(i)+'"'}}return e};j.prototype.buildObjectNode=function(s,e,t,n){if(s==="")return e[0]==="?"?this.indentate(n)+"<"+e+t+"?"+this.tagEndChar:this.indentate(n)+"<"+e+t+this.closeTag(e)+this.tagEndChar;if(e[0]==="?")return this.indentate(n)+"<"+e+t+"?"+this.tagEndChar;{let i="</"+e+this.tagEndChar,r="";return e[0]==="?"&&(r="?",i=""),(t||t==="")&&s.indexOf("<")===-1?this.indentate(n)+"<"+e+t+r+">"+s+i:this.options.commentPropName!==!1&&e===this.options.commentPropName&&r.length===0?this.indentate(n)+`<!--${Ze(s)}-->`+this.newLine:this.indentate(n)+"<"+e+t+r+this.tagEndChar+s+this.indentate(n)+i}};j.prototype.closeTag=function(s){let e="";return this.options.unpairedTags.indexOf(s)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${s}`,e};j.prototype.checkStopNode=function(s){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let e=0;e<this.stopNodeExpressions.length;e++)if(s.matches(this.stopNodeExpressions[e]))return!0;return!1};j.prototype.buildTextValNode=function(s,e,t,n,i){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName){let r=Yt(s);return this.indentate(n)+`<![CDATA[${r}]]>`+this.newLine}else if(this.options.commentPropName!==!1&&e===this.options.commentPropName){let r=Ze(s);return this.indentate(n)+`<!--${r}-->`+this.newLine}else{if(e[0]==="?")return this.indentate(n)+"<"+e+t+"?"+this.tagEndChar;{let r=this.options.tagValueProcessor(e,s);return r=this.replaceEntitiesValue(r),r===""?this.indentate(n)+"<"+e+t+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+t+">"+r+"</"+e+this.tagEndChar}}};j.prototype.replaceEntitiesValue=function(s){if(s&&s.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){let t=this.options.entities[e];s=s.replace(t.regex,t.val)}return s};function qu(s){return this.options.indentBy.repeat(s)}function Pu(s){return s.startsWith(this.options.attributeNamePrefix)&&s!==this.options.textNodeName?s.substr(this.attrPrefixLen):!1}var Cn=j;var Ws=Xs(oo(),1),pr=Xs(uc(),1);var Mu=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i,et=class s extends Date{#t=!1;#s=!1;#e=null;constructor(e){let t=!0,n=!0,i="Z";if(typeof e=="string"){let r=e.match(Mu);r?(r[1]||(t=!1,e=`0000-01-01T${e}`),n=!!r[2],n&&e[10]===" "&&(e=e.replace(" ","T")),r[2]&&+r[2]>23?e="":(i=r[3]||null,e=e.toUpperCase(),!i&&n&&(e+="Z"))):e=""}super(e),isNaN(this.getTime())||(this.#t=t,this.#s=n,this.#e=i)}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")return e;let t=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return t=this.#e[0]==="-"?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,t="Z"){let n=new s(e);return n.#e=t,n}static wrapAsLocalDateTime(e){let t=new s(e);return t.#e=null,t}static wrapAsLocalDate(e){let t=new s(e);return t.#s=!1,t.#e=null,t}static wrapAsLocalTime(e){let t=new s(e);return t.#t=!1,t.#e=null,t}};function $u(s,e){let t=s.slice(0,e).split(/\r\n|\n|\r/g);return[t.length,t.pop().length+1]}function Ru(s,e,t){let n=s.split(/\r\n|\n|\r/g),i="",r=(Math.log10(e+1)|0)+1;for(let o=e-1;o<=e+1;o++){let a=n[o-1];a&&(i+=o.toString().padEnd(r," "),i+=": ",i+=a,i+=`
|
|
149
|
-
`,o===e&&(i+=" ".repeat(r+t+2),i+=`^
|
|
150
|
-
`))}return i}var T=class extends Error{line;column;codeblock;constructor(e,t){let[n,i]=$u(t.toml,t.ptr),r=Ru(t.toml,n,i);super(`Invalid TOML document: ${e}
|
|
151
|
-
|
|
152
|
-
${r}`,t),this.line=n,this.column=i,this.codeblock=r}};function On(s,e=0){let t=s.indexOf(`
|
|
153
|
-
`,e);return s.charCodeAt(t-1)===13&&t--,t}function Ht(s){for(;s.p<s.s.length;s.p++){let e=s.s.charCodeAt(s.p);if(e===10)break;if(e===13&&s.s.charCodeAt(s.p+1)===10){s.p++;break}if(e<32&&e!==9||e===127)throw new T("control characters are not allowed in comments",{toml:s.s,ptr:s.p})}}function z(s,e,t){let n;for(;;){for(;(n=s.s.charCodeAt(s.p))===32||n===9||!e&&(n===10||n===13&&s.s.charCodeAt(s.p+1)===10);)s.p++;if(t||n!==35)break;Ht(s)}}function ao(s,e,t){let n=s.p;if(!t){n=On(s.s,n),s.p=n<0?s.s.length:n;return}for(;s.p<s.s.length;s.p++){let i=s.s.charCodeAt(s.p);if(i===35)Ht(s);else if(i===t||i===e)return}throw new T("cannot find end of structure",{toml:s.s,ptr:n})}var Fu=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,ju=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,Bu=/^[+-]?0[0-9_]/;function Jt(s){let e=s.p,t=s.s.charCodeAt(s.p++),n=t,i=t===39,r=t===s.s.charCodeAt(s.p)&&t===s.s.charCodeAt(s.p+1);r&&((t=s.s.charCodeAt(s.p+=2))===10?s.p++:t===13&&s.s.charCodeAt(s.p+1)===10&&(s.p+=2));let o="",a=s.p,l=0;for(;s.p<s.s.length;s.p++)if(t=s.s.charCodeAt(s.p),r&&(t===10||t===13&&s.s.charCodeAt(s.p+1)===10))l=l&&3;else{if(t<32&&t!==9||t===127)throw new T("control characters are not allowed in strings",{toml:s.s,ptr:s.p});if((!l||l===3)&&t===n&&(!r||s.s.charCodeAt(s.p+1)===n&&s.s.charCodeAt(s.p+2)===n))return r&&(s.s.charCodeAt(s.p+3)===n&&s.p++,s.s.charCodeAt(s.p+3)===n&&s.p++),l||(o+=s.s.slice(a,s.p)),s.p+=r?3:1,o;if(!l)!i&&t===92&&(o+=s.s.slice(a,a=s.p),l=1);else if(l===1)if(t===120||t===117||t===85){let c=0,u=t===120?2:t===117?4:8;for(let f=0;f<u;f++,s.p++){let d=s.s.charCodeAt(s.p+1),p=d>=48&&d<=57?d-48:d>=65&&d<=70?d-65+10:d>=97&&d<=102?d-97+10:-1;if(p<0)throw new T("invalid non-hex character in unicode escape",{toml:s.s,ptr:s.p+1});c=c<<4|p}if(c<0||c>1114111||c>=55296&&c<=57343)throw new T("invalid unicode escape",{toml:s.s,ptr:s.p});o+=String.fromCodePoint(c),a=s.p+1,l=0}else if(t===32||t===9)l=2;else{if(t===98)o+="\b";else if(t===116)o+=" ";else if(t===110)o+=`
|
|
154
|
-
`;else if(t===102)o+="\f";else if(t===114)o+="\r";else if(t===101)o+="\x1B";else if(t===34)o+='"';else if(t===92)o+="\\";else throw new T("unrecognized escape sequence",{toml:s.s,ptr:s.p});a=s.p+1,l=0}else if(t!==32&&t!==9){if(l===2)throw new T("invalid escape: only line-ending whitespace may be escaped",{toml:s.s,ptr:a});l=!i&&t===92?1:0,a=s.p}}throw new T("unfinished string",{toml:s.s,ptr:e})}function Du(s,e,t){let n=s.s.slice(e,t),i=n.indexOf("#");return i>0&&(Ht({s:n,p:i,d:0}),n=n.slice(0,i)),n.trimEnd()}function lo(s,e,t){let n=s.p,i={toml:s.s,ptr:n};ao(s,44,t);let r=Du(s,n,s.p);if(!r)throw new T("incomplete declaration: value expected",i);if(r==="-inf")return-1/0;if(r==="inf"||r==="+inf")return 1/0;if(r==="nan"||r==="+nan"||r==="-nan")return NaN;if(r==="-0")return e?0n:0;let o=Fu.test(r);if(o||ju.test(r)){if(Bu.test(r))throw new T("leading zeroes are not allowed",i);r=r.replace(/_/g,"");let l=+r;if(isNaN(l))throw new T("invalid number",i);if(o){if((o=!Number.isSafeInteger(l))&&!e)throw new T("integer value cannot be represented losslessly",i);(o||e===!0)&&(l=BigInt(r))}return l}let a=new et(r);if(!a.isValid())throw new T("invalid value",i);return a}function tt(s,e,t){let n=s.p,i=s.s.charCodeAt(n);if(i===91||i===123){if(!s.d--)throw new T("document contains excessively nested structures. aborting.",{toml:s.s,ptr:n});let r=i===91?uo(s,t):co(s,t);return s.d++,r}if(i===34||i===39)return Jt(s);if(i===116){if(s.s.charCodeAt(++s.p)!==114||s.s.charCodeAt(++s.p)!==117||s.s.charCodeAt(++s.p)!==101)throw new T("invalid value",{toml:s.s,ptr:n});return s.p++,!0}if(i===102){if(s.s.charCodeAt(++s.p)!==97||s.s.charCodeAt(++s.p)!==108||s.s.charCodeAt(++s.p)!==115||s.s.charCodeAt(++s.p)!==101)throw new T("invalid value",{toml:s.s,ptr:n});return s.p++,!1}return lo(s,t,e)}var Vu=/^[a-zA-Z0-9-_]+[ \t]*$/;function Wt(s,e="="){let t=s.p,n=t-1,i=[],r=s.s.indexOf(e,t);if(r<0)throw new T("incomplete key-value: cannot find end of key",{toml:s.s,ptr:t});do{let o=s.s.charCodeAt(s.p=++n);if(o!==32&&o!==9)if(o===34||o===39){if(o===s.s.charCodeAt(s.p+1)&&o===s.s.charCodeAt(s.p+2))throw new T("multiline strings are not allowed in keys",{toml:s.s,ptr:s.p});let a=Jt(s);n=s.s.indexOf(".",s.p);let l=s.s.slice(s.p,n<0||n>r?r:n),c=On(l);if(c>-1)throw new T("newlines are not allowed in keys",{toml:s.s,ptr:c});if(l.trimStart())throw new T("found extra tokens after the string part",{toml:s.s,ptr:s.p});if(r<s.p&&(r=s.s.indexOf(e,s.p),r<0))throw new T("incomplete key-value: cannot find end of key",{toml:s.s,ptr:t});i.push(a)}else{n=s.s.indexOf(".",s.p);let a=s.s.slice(s.p,n<0||n>r?r:n);if(!Vu.test(a))throw new T("only letter, numbers, dashes and underscores are allowed in keys",{toml:s.s,ptr:s.p});i.push(a.trimEnd())}}while(n+1&&n<r);return s.p=r+1,z(s,!0,!0),i}function co(s,e){let t={},n=new Set,i;for(s.p++;s.p<s.s.length;){if(z(s),(i=s.s.charCodeAt(s.p))===125)return s.p++,t;let r,o=t,a=!1,l=s.p,c=Wt(s);for(let f=0;f<c.length;f++){if(f&&(o=a?o[r]:o[r]={}),r=c[f],(a=Object.hasOwn(o,r))&&(typeof o[r]!="object"||n.has(o[r])))throw new T("trying to redefine an already defined value",{toml:s.s,ptr:l});!a&&r==="__proto__"&&Object.defineProperty(o,r,{enumerable:!0,configurable:!0,writable:!0})}if(a)throw new T("trying to redefine an already defined value",{toml:s.s,ptr:s.p});let u=tt(s,125,e);if(n.add(o[r]=u),z(s),(i=s.s.charCodeAt(s.p++))===125)return t;if(i!==44)throw new T("expected comma or end of structure",{toml:s.s,ptr:s.p-1})}throw new T("unfinished table encountered",{toml:s.s,ptr:s.p})}function uo(s,e){let t=[],n;for(s.p++;s.p<s.s.length;){if(z(s),(n=s.s.charCodeAt(s.p))===93)return s.p++,t;if(t.push(tt(s,93,e)),z(s),(n=s.s.charCodeAt(s.p++))===93)return t;if(n!==44)throw new T("expected comma or end of structure",{toml:s.s,ptr:s.p-1})}throw new T("unfinished array encountered",{toml:s.s,ptr:s.p})}function fo(s,e,t,n){let i=e,r=t,o,a=!1,l;for(let c=0;c<s.length;c++){if(c){if(i=a?i[o]:i[o]={},r=(l=r[o]).c,n===0&&(l.t===1||l.t===2))return null;if(l.t===2){let u=i.length-1;i=i[u],r=r[u].c}}if(o=s[c],(a=Object.hasOwn(i,o))&&r[o]?.t===0&&r[o]?.d)return null;a||(o==="__proto__"&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(r,o,{enumerable:!0,configurable:!0,writable:!0})),r[o]={t:c<s.length-1&&n===2?3:n,d:!1,i:0,c:{}})}if(l=r[o],l.t!==n&&!(n===1&&l.t===3)||(n===2&&(l.d||(l.d=!0,i[o]=[]),i[o].push(i={}),l.c[l.i++]=l={t:1,d:!1,i:0,c:{}}),l.d))return null;if(l.d=!0,n===1)i=a?i[o]:i[o]={};else if(n===0&&a)return null;return[o,i,l.c]}function Xt(s,{maxDepth:e=1e3,integersAsBigInt:t}={}){let n={s,p:0,d:e},i={},r={},o,a=i,l=r;for(z(n);n.p<s.length;){if(s.charCodeAt(n.p)===91){let c=s.charCodeAt(++n.p)===91;o=n.p+=+c;let u=Wt(n,"]");if(c){if(s.charCodeAt(n.p-1)!==93)throw new T("expected end of table declaration",{toml:s,ptr:n.p-1});n.p++}let f=fo(u,i,r,c?2:1);if(!f)throw new T("trying to redefine an already defined table or value",{toml:s,ptr:o});l=f[2],a=f[1]}else{o=n.p;let c=Wt(n),u=fo(c,a,l,0);if(!u)throw new T("trying to redefine an already defined table or value",{toml:s,ptr:o});u[1][u[0]]=tt(n,void 0,t)}if(z(n,!0),n.p<s.length&&(o=s.charCodeAt(n.p))!==10&&o!==13)throw new T("each key-value declaration must be followed by an end-of-line",{toml:s,ptr:n.p});z(n)}return i}var ho=/^[a-z0-9-_]+$/i;function st(s){let e=typeof s;if(e==="object"){if(Array.isArray(s))return"array";if(typeof s?.getUTCDate=="function"&&s instanceof Date)return"date";if(globalThis.Temporal&&typeof s?.since=="function"&&(s instanceof Temporal.Instant||s instanceof Temporal.PlainDate||s instanceof Temporal.PlainDateTime||s instanceof Temporal.PlainTime||s instanceof Temporal.ZonedDateTime))return"temporal"}return e}function Uu(s){for(let e=0;e<s.length;e++)if(st(s[e])!=="object")return!1;return s.length!=0}function Ln(s){return JSON.stringify(s).replace(/\x7f/g,"\\u007f")}function Ku(s){return s.toString({calendarName:"never",timeZoneName:"never"})}function In(s,e,t,n){if(t===0)throw new Error("Could not stringify the object: maximum object depth exceeded");switch(e){case"number":if(isNaN(s))return"nan";if(s===1/0)return"inf";if(s===-1/0)return"-inf";if(Number.isInteger(s)&&(n||!Number.isSafeInteger(s)))return s.toFixed(1);case"bigint":case"boolean":return s.toString();case"string":return Ln(s);case"date":if(isNaN(s.getTime()))throw new TypeError("cannot serialize invalid date");return s.toISOString();case"object":return Yu(s,t,n);case"array":return Gu(s,t,n);case"temporal":return Ku(s)}}function Yu(s,e,t){let n=Object.keys(s);if(n.length===0)return"{}";let i="{ ";for(let r=0;r<n.length;r++){let o=n[r];r&&(i+=", "),i+=ho.test(o)?o:Ln(o),i+=" = ",i+=In(s[o],st(s[o]),e-1,t)}return i+" }"}function Gu(s,e,t){if(s.length===0)return"[]";let n="[ ";for(let i=0;i<s.length;i++){if(i&&(n+=", "),s[i]===null||s[i]===void 0)throw new TypeError("arrays cannot contain null or undefined values");n+=In(s[i],st(s[i]),e-1,t)}return n+" ]"}function Hu(s,e,t,n){if(t===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let i="";for(let r=0;r<s.length;r++)i+=`${i&&`
|
|
155
|
-
`}[[${e}]]
|
|
156
|
-
`,i+=_n(0,s[r],e,t,n);return i}function _n(s,e,t,n,i){if(n===0)throw new Error("Could not stringify the object: maximum object depth exceeded");let r="",o="",a=Object.keys(e);for(let l=0;l<a.length;l++){let c=a[l];if(e[c]!==null&&e[c]!==void 0){let u=st(e[c]);if(u==="symbol"||u==="function")throw new TypeError(`cannot serialize values of type '${u}'`);let f=ho.test(c)?c:Ln(c);if(u==="array"&&Uu(e[c]))o+=(o&&`
|
|
157
|
-
`)+Hu(e[c],t?`${t}.${f}`:f,n-1,i);else if(u==="object"){let d=t?`${t}.${f}`:f;o+=(o&&`
|
|
158
|
-
`)+_n(d,e[c],d,n-1,i)}else r+=f,r+=" = ",r+=In(e[c],u,n,i),r+=`
|
|
159
|
-
`}}return s&&(r||!o)&&(r=r?`[${s}]
|
|
160
|
-
${r}`:`[${s}]`),r&&o?`${r}
|
|
161
|
-
${o}`:r||o}function qn(s,{maxDepth:e=1e3,numbersAsFloat:t=!1}={}){if(st(s)!=="object")throw new TypeError("stringify can only be called with an object");let n=_n(0,s,"",e,t);return n[n.length-1]!==`
|
|
162
|
-
`?n+`
|
|
163
|
-
`:n}var qt=Xs(sc(),1);var Em=["yaml","xml","json","ini","csv","toml"],vm=["yaml","json","xml","ini","csv","toml"];function mr(s){return typeof s=="string"&&Em.includes(s)}function gr(s){return typeof s=="string"&&vm.includes(s)}var nc={inputFormat:"yaml",outputFormat:"yaml",raw:!1,compact:!1,prettyPrint:!1,indent:2,xmlAttributePrefix:"+@",xmlContentName:"+content",csvDelimiter:"",csvHeader:!0};function Tm(s){let e=s.lastIndexOf("."),t=Math.max(s.lastIndexOf("/"),s.lastIndexOf("\\"));return e<=t+1?"":s.slice(e)}function ic(s){switch(Tm(s).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 Cm(s,e,t){return pr.default.parse(s,{delimiter:e||void 0,header:t,dynamicTyping:!0,skipEmptyLines:!0}).data}function km(s,e){return Array.isArray(s)||(s=[s]),pr.default.unparse(s,{delimiter:e||","})}function yr(s,e,t={}){let n=s.trim();if(!n)return null;let i=r=>Ee(r,t);switch(e.inputFormat){case"yaml":return i(qt.default.parse(n,{maxAliasCount:100}));case"json":return i(JSON.parse(n));case"xml":{let r=new Ie({ignoreAttributes:!1,attributeNamePrefix:e.xmlAttributePrefix,textNodeName:e.xmlContentName,parseAttributeValue:!1,parseTagValue:!1,trimValues:!0,processEntities:!1,tagValueProcessor:(o,a)=>a===""?null:a});return i(r.parse(n))}case"ini":return i(Ws.parse(n));case"csv":return i(Cm(n,e.csvDelimiter,e.csvHeader));case"toml":return i(Xt(n));default:{let r=e.inputFormat;throw new Error(`Invalid input format: ${r}`)}}}function rc(s,e={}){let t=e.maxElements??1e6,n=s.trim()?1:0,i=0;for(;i<s.length;){let l=s.indexOf(`
|
|
164
|
-
`,i),c=i+3,u=s[c];if(i>0&&s.startsWith("---",i)&&(u===void 0||u===`
|
|
165
|
-
`||u==="\r"||u===" "||u===" "||u==="#")&&(n++,n>t))throw new G(`query input document limit exceeded (${t})`,"array_elements");if(l===-1)break;i=l+1}let r=qt.default.parseAllDocuments(s);if(r.length>t)throw new G(`query input document limit exceeded (${t})`,"array_elements");let o={used:r.length},a=[];for(let l of r)a.push(Ee(l.toJS({maxAliasCount:100}),{...e,elementBudget:o}));return a}function oc(s,e={}){let t=s.trimStart();if(t.startsWith("---")){let n=t.slice(3).match(/\n---(\n|$)/);if(n&&n.index!==void 0){let i=t.slice(3,n.index+3),r=t.slice(n.index+3+n[0].length);return{frontMatter:Ee(qt.default.parse(i,{maxAliasCount:100}),e),content:r}}}if(t.startsWith("+++")){let n=t.slice(3).match(/\n\+\+\+(\n|$)/);if(n&&n.index!==void 0){let i=t.slice(3,n.index+3),r=t.slice(n.index+3+n[0].length);return{frontMatter:Ee(Xt(i),e),content:r}}}if(t.startsWith("{{{")){let n=t.slice(3).match(/\n}}}(\n|$)/);if(n&&n.index!==void 0){let i=t.slice(3,n.index+3),r=t.slice(n.index+3+n[0].length);return{frontMatter:Ee(JSON.parse(i),e),content:r}}}return null}function ac(s,e,t=Number.MAX_SAFE_INTEGER){if(s===void 0)return"";e.outputFormat!=="json"&&xm(s,e,t);let n;switch(e.outputFormat){case"yaml":n=qt.default.stringify(s,{indent:e.indent}).trimEnd();break;case"json":return Cr(s,t,{compact:e.compact,raw:e.raw,indent:e.indent});case"xml":{n=new Cn({ignoreAttributes:!1,attributeNamePrefix:e.xmlAttributePrefix,textNodeName:e.xmlContentName,format:e.prettyPrint||!e.compact,indentBy:" ".repeat(e.indent)}).build(s);break}case"ini":{if(!s||typeof s!="object"||Array.isArray(s)){n="";break}n=Ws.stringify(s);break}case"csv":n=km(s,e.csvDelimiter);break;case"toml":{if(!s||typeof s!="object"||Array.isArray(s)){n="";break}n=qn(s);break}default:throw new Error(`Unknown output format: ${e.outputFormat}`)}return new Mt(t,"yq output",()=>new G(`output size limit exceeded (${t} bytes)`,"output_size")).append(n).build()}function xm(s,e,t){let n=e.outputFormat==="yaml"||e.outputFormat==="toml"?6:2,i=new WeakSet,r=[{kind:"value",value:s,depth:0,labelBytes:0}],o=0,a=l=>{if(!Number.isSafeInteger(l)||l<0||l>t-o)throw new G(`output size limit exceeded (${t} bytes)`,"output_size");o+=l};for(;r.length>0;){let l=r.pop();if(!l)break;if(l.kind==="exit"){i.delete(l.value);continue}let{value:c,depth:u,labelBytes:f}=l;if(typeof c=="string"){a(f+u*e.indent),a(Ue(c)*(u===0?1:n));continue}if(c===null||typeof c!="object"){a(f+u*e.indent+Ue(String(c)));continue}if(a(32+f+u*e.indent),c instanceof Date){a(Ue(c.toISOString())*n);continue}if(i.has(c))throw new Error("cyclic value cannot be formatted");if(i.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,p=Object.keys(d);for(let g=p.length-1;g>=0;g--){let h=p[g],m=Ue(h);a(m*n),r.push({kind:"value",value:d[h],depth:u+1,labelBytes:m})}}}var Om={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.
|
|
166
|
-
Supports YAML, JSON, XML, INI, CSV, and TOML with automatic format conversion.
|
|
167
|
-
|
|
168
|
-
EXAMPLES:
|
|
169
|
-
# Extract a value from YAML
|
|
170
|
-
yq '.name' config.yaml
|
|
171
|
-
yq '.users[0].email' data.yaml
|
|
172
|
-
|
|
173
|
-
# Filter arrays
|
|
174
|
-
yq '.items[] | select(.active == true)' data.yaml
|
|
175
|
-
yq '[.users[] | select(.age > 30)]' users.yaml
|
|
176
|
-
|
|
177
|
-
# Transform data
|
|
178
|
-
yq '.users | map({name, email})' data.yaml
|
|
179
|
-
yq '.items | sort_by(.price) | reverse' products.yaml
|
|
180
|
-
|
|
181
|
-
# Modify file in-place
|
|
182
|
-
yq -i '.version = "2.0"' config.yaml
|
|
183
|
-
|
|
184
|
-
# Read JSON, output YAML
|
|
185
|
-
yq -p json '.' config.json
|
|
186
|
-
|
|
187
|
-
# Read YAML, output JSON
|
|
188
|
-
yq -o json '.' config.yaml
|
|
189
|
-
yq -o json -c '.' config.yaml # compact JSON
|
|
190
|
-
|
|
191
|
-
# Parse TOML config files
|
|
192
|
-
yq '.package.name' Cargo.toml
|
|
193
|
-
yq -o json '.' pyproject.toml
|
|
194
|
-
|
|
195
|
-
# Parse XML (attributes use +@ prefix, text uses +content)
|
|
196
|
-
yq -p xml '.root.items.item[].name' data.xml
|
|
197
|
-
yq -p xml '.root.user["+@id"]' data.xml # XML attributes
|
|
198
|
-
|
|
199
|
-
# Parse INI config files
|
|
200
|
-
yq -p ini '.database.host' config.ini
|
|
201
|
-
yq -p ini '.server' config.ini -o json
|
|
202
|
-
|
|
203
|
-
# Parse CSV/TSV (auto-detects delimiter)
|
|
204
|
-
yq -p csv '.[0].name' data.csv
|
|
205
|
-
yq '.[0].name' data.tsv # auto-detected as CSV
|
|
206
|
-
yq -p csv '[.[] | select(.category == "A")]' data.csv
|
|
207
|
-
|
|
208
|
-
# Extract front-matter from markdown/content files
|
|
209
|
-
yq --front-matter '.title' post.md
|
|
210
|
-
|
|
211
|
-
# Convert between formats
|
|
212
|
-
yq -p json -o csv '.users' data.json # JSON to CSV
|
|
213
|
-
yq -p csv -o yaml '.' data.csv # CSV to YAML
|
|
214
|
-
yq -p ini -o json '.' config.ini # INI to JSON
|
|
215
|
-
yq -p xml -o json '.' data.xml # XML to JSON
|
|
216
|
-
yq -o toml '.' config.yaml # YAML to TOML
|
|
217
|
-
|
|
218
|
-
# Common jq functions work in yq:
|
|
219
|
-
yq 'keys' data.yaml # get object keys
|
|
220
|
-
yq 'length' data.yaml # array/string length
|
|
221
|
-
yq '.items | first' data.yaml # first element
|
|
222
|
-
yq '.items | last' data.yaml # last element
|
|
223
|
-
yq '.nums | add' data.yaml # sum numbers
|
|
224
|
-
yq '.nums | min' data.yaml # minimum
|
|
225
|
-
yq '.nums | max' data.yaml # maximum
|
|
226
|
-
yq '.items | unique' data.yaml # unique values
|
|
227
|
-
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 lc(s){if(s===void 0||!/^\d+$/.test(s))return null;let e=Number(s);return!Number.isSafeInteger(e)||e<0||e>32?null:e}function cc(s){return{stdout:"",stderr:`yq: invalid indent '${s??""}' (expected integer 0..32)
|
|
228
|
-
`,exitCode:2}}function Lm(s){let e={...nc,exitStatus:!1,slurp:!1,nullInput:!1,joinOutput:!1,inplace:!1,frontMatter:!1},t=!1,n=".",i=!1,r=[];for(let o=0;o<s.length;o++){let a=s[o];if(a.startsWith("--input-format=")){let l=a.slice(15);if(!mr(l))return he("yq",`--input-format=${l}`);e.inputFormat=l,t=!0}else if(a.startsWith("--output-format=")){let l=a.slice(16);if(!gr(l))return he("yq",`--output-format=${l}`);e.outputFormat=l}else if(a.startsWith("--indent=")){let l=a.slice(9),c=lc(l);if(c===null)return cc(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=s[++o];if(!mr(l))return he("yq",`${a} ${l}`);e.inputFormat=l,t=!0}else if(a==="-o"||a==="--output-format"){let l=s[++o];if(!gr(l))return he("yq",`${a} ${l}`);e.outputFormat=l}else if(a==="-I"||a==="--indent"){let l=s[++o],c=lc(l);if(c===null)return cc(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 he("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 he("yq",`-${l}`);else i?r.push(a):(n=a,i=!0)}}return{options:e,filter:n,files:r,inputFormatExplicit:t}}var Ib={name:"yq",async execute(s,e){Ar(e.requireDefenseContext,"yq","execution entry");let t=(u,f)=>Er(e.requireDefenseContext,"yq",u,f);if(Nr(s))return Sr(Om);let n=Lm(s);if("exitCode"in n)return n;let{options:i,filter:r,files:o,inputFormatExplicit:a}=n;if(!a&&o.length>0&&o[0]!=="-"){let u=ic(o[0]);u&&(i.inputFormat=u)}if(i.inplace&&(o.length===0||o[0]==="-"))return{stdout:"",stderr:`yq: -i/--inplace requires a file argument
|
|
229
|
-
`,exitCode:1};let l,c;if(i.nullInput)l="";else if(o.length===0||o.length===1&&o[0]==="-")l=wr(e.stdin);else try{let u=e.fs.resolvePath(e.cwd,o[0]);c=u,l=await t("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
|
|
230
|
-
`,exitCode:2}}try{let u=Tr(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}},p={maxDepth:e.limits.maxQueryDepth,maxElements:e.limits.maxQueryElements};if(i.nullInput)f=Ke(null,u,d);else if(i.frontMatter){let S=oc(l,p);if(!S)return{stdout:"",stderr:`yq: no front-matter found
|
|
231
|
-
`,exitCode:1};f=Ke(S.frontMatter,u,d)}else if(i.slurp){let S;i.inputFormat==="yaml"?S=rc(l,p):S=[yr(l,i,p)],f=Ke(S,u,d)}else{let S=yr(l,i,p);f=Ke(S,u,d)}let g=Math.min(e.limits.maxStringLength,e.limits.maxOutputSize),h=i.joinOutput?"":`
|
|
232
|
-
`,m=new Mt(g,"yq output",()=>new G(`output size limit exceeded (${g} bytes)`,"output_size")),b=0;for(let S of f){if(vr(S,e.limits.maxQueryDepth+1)>e.limits.maxQueryDepth)throw new G(`query depth limit exceeded (${e.limits.maxQueryDepth})`,"recursion");let v=b>0?h.length:0,E=i.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"),K;try{K=ac(S,i,N)}finally{O?.release()}K!==""&&(b>0&&m.append(h),m.append(K),b++)}b>0&&!i.joinOutput&&m.append(`
|
|
233
|
-
`);let y=m.build();if(i.inplace&&c)return await t("in-place write",()=>e.fs.writeFile(c,y)),{stdout:"",stderr:"",exitCode:0};let A=i.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: ${Qs(u.message)}
|
|
234
|
-
`,exitCode:G.EXIT_CODE};let f=Qs(u.message);return f.includes("Unknown function")?{stdout:"",stderr:`yq: error: ${f}
|
|
235
|
-
`,exitCode:3}:{stdout:"",stderr:`yq: parse error: ${f}
|
|
236
|
-
`,exitCode:5}}}},_b={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{Ib as a,_b as b};
|
|
237
|
-
/*! Bundled license information:
|
|
238
|
-
|
|
239
|
-
smol-toml/dist/date.js:
|
|
240
|
-
smol-toml/dist/error.js:
|
|
241
|
-
smol-toml/dist/util.js:
|
|
242
|
-
smol-toml/dist/primitive.js:
|
|
243
|
-
smol-toml/dist/extract.js:
|
|
244
|
-
smol-toml/dist/struct.js:
|
|
245
|
-
smol-toml/dist/parse.js:
|
|
246
|
-
smol-toml/dist/stringify.js:
|
|
247
|
-
smol-toml/dist/index.js:
|
|
248
|
-
(*!
|
|
249
|
-
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
250
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
251
|
-
*
|
|
252
|
-
* Redistribution and use in source and binary forms, with or without
|
|
253
|
-
* modification, are permitted provided that the following conditions are met:
|
|
254
|
-
*
|
|
255
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
256
|
-
* list of conditions and the following disclaimer.
|
|
257
|
-
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
258
|
-
* this list of conditions and the following disclaimer in the
|
|
259
|
-
* documentation and/or other materials provided with the distribution.
|
|
260
|
-
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
261
|
-
* may be used to endorse or promote products derived from this software without
|
|
262
|
-
* specific prior written permission.
|
|
263
|
-
*
|
|
264
|
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
265
|
-
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
266
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
267
|
-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
268
|
-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
269
|
-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
270
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
271
|
-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
272
|
-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
273
|
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
274
|
-
*)
|
|
275
|
-
*/
|