diff --git a/deno.lock b/deno.lock index 927286b..4232c35 100644 --- a/deno.lock +++ b/deno.lock @@ -2,10 +2,30 @@ "version": "3", "packages": { "specifiers": { + "jsr:@david/code-block-writer@^13.0.2": "jsr:@david/code-block-writer@13.0.2", + "jsr:@deno/cache-dir@^0.10.3": "jsr:@deno/cache-dir@0.10.3", + "jsr:@deno/dnt@0.41.3": "jsr:@deno/dnt@0.41.3", + "jsr:@deno/graph@^0.73.1": "jsr:@deno/graph@0.73.1", "jsr:@kesin11/gha-utils@^0.1.0": "jsr:@kesin11/gha-utils@0.1.0", + "jsr:@std/assert@^0.223.0": "jsr:@std/assert@0.223.0", + "jsr:@std/assert@^0.226.0": "jsr:@std/assert@0.226.0", + "jsr:@std/bytes@^0.223.0": "jsr:@std/bytes@0.223.0", "jsr:@std/collections@^1.0.2": "jsr:@std/collections@1.0.2", "jsr:@std/encoding@^1.0.0": "jsr:@std/encoding@1.0.0", + "jsr:@std/fmt@1": "jsr:@std/fmt@1.0.0", + "jsr:@std/fmt@^0.223": "jsr:@std/fmt@0.223.0", + "jsr:@std/fs@1": "jsr:@std/fs@1.0.1", + "jsr:@std/fs@^0.223": "jsr:@std/fs@0.223.0", + "jsr:@std/fs@^0.229.3": "jsr:@std/fs@0.229.3", + "jsr:@std/io@^0.223": "jsr:@std/io@0.223.0", + "jsr:@std/path@1": "jsr:@std/path@1.0.2", + "jsr:@std/path@1.0.0-rc.1": "jsr:@std/path@1.0.0-rc.1", + "jsr:@std/path@^0.223": "jsr:@std/path@0.223.0", + "jsr:@std/path@^0.225.2": "jsr:@std/path@0.225.2", + "jsr:@std/path@^1.0.2": "jsr:@std/path@1.0.2", "jsr:@std/yaml@^0.224.3": "jsr:@std/yaml@0.224.3", + "jsr:@ts-morph/bootstrap@^0.24.0": "jsr:@ts-morph/bootstrap@0.24.0", + "jsr:@ts-morph/common@^0.24.0": "jsr:@ts-morph/common@0.24.0", "npm:@actions/core@1.10.1": "npm:@actions/core@1.10.1", "npm:@actions/github@6.0.0": "npm:@actions/github@6.0.0_@octokit+core@5.1.0", "npm:@octokit/plugin-retry@^7.1.1": "npm:@octokit/plugin-retry@7.1.1_@octokit+core@6.1.2", @@ -21,10 +41,38 @@ "npm:esbuild@0.20.0": "npm:esbuild@0.20.0", "npm:esbuild@0.20.1": "npm:esbuild@0.20.1", "npm:esbuild@0.21.5": "npm:esbuild@0.21.5", + "npm:esbuild@0.23.0": "npm:esbuild@0.23.0", "npm:structured-source@^4.0.0": "npm:structured-source@4.0.0", "npm:yaml-ast-parser@^0.0.43": "npm:yaml-ast-parser@0.0.43" }, "jsr": { + "@david/code-block-writer@13.0.2": { + "integrity": "14dd3baaafa3a2dea8bf7dfbcddeccaa13e583da2d21d666c01dc6d681cd74ad" + }, + "@deno/cache-dir@0.10.3": { + "integrity": "eb022f84ecc49c91d9d98131c6e6b118ff63a29e343624d058646b9d50404776", + "dependencies": [ + "jsr:@deno/graph@^0.73.1", + "jsr:@std/fmt@^0.223", + "jsr:@std/fs@^0.223", + "jsr:@std/io@^0.223", + "jsr:@std/path@^0.223" + ] + }, + "@deno/dnt@0.41.3": { + "integrity": "b2ef2c8a5111eef86cb5bfcae103d6a2938e8e649e2461634a7befb7fc59d6d2", + "dependencies": [ + "jsr:@david/code-block-writer@^13.0.2", + "jsr:@deno/cache-dir@^0.10.3", + "jsr:@std/fmt@1", + "jsr:@std/fs@1", + "jsr:@std/path@1", + "jsr:@ts-morph/bootstrap@^0.24.0" + ] + }, + "@deno/graph@0.73.1": { + "integrity": "cd69639d2709d479037d5ce191a422eabe8d71bb68b0098344f6b07411c84d41" + }, "@kesin11/gha-utils@0.1.0": { "integrity": "4f6ed8a950456ac0f7ef4d276cbe576013d2c4f3454a9388a65587b88aaf6f6f", "dependencies": [ @@ -38,14 +86,82 @@ "npm:yaml-ast-parser@^0.0.43" ] }, + "@std/assert@0.223.0": { + "integrity": "eb8d6d879d76e1cc431205bd346ed4d88dc051c6366365b1af47034b0670be24" + }, + "@std/assert@0.226.0": { + "integrity": "0dfb5f7c7723c18cec118e080fec76ce15b4c31154b15ad2bd74822603ef75b3" + }, + "@std/bytes@0.223.0": { + "integrity": "84b75052cd8680942c397c2631318772b295019098f40aac5c36cead4cba51a8" + }, "@std/collections@1.0.2": { "integrity": "cb1834be534f967e86495f6c64fa06f6b3debdaab5b860c2d3194db59cd30157" }, "@std/encoding@1.0.0": { "integrity": "3cabf87b3eadb69126b42998188c87155238ceef805af3f241acca00ddb0cbb2" }, + "@std/fmt@0.223.0": { + "integrity": "6deb37794127dfc7d7bded2586b9fc6f5d50e62a8134846608baf71ffc1a5208" + }, + "@std/fmt@1.0.0": { + "integrity": "8a95c9fdbb61559418ccbc0f536080cf43341655e1444f9d375a66886ceaaa3d" + }, + "@std/fs@0.223.0": { + "integrity": "3b4b0550b2c524cbaaa5a9170c90e96cbb7354e837ad1bdaf15fc9df1ae9c31c" + }, + "@std/fs@0.229.3": { + "integrity": "783bca21f24da92e04c3893c9e79653227ab016c48e96b3078377ebd5222e6eb", + "dependencies": [ + "jsr:@std/path@1.0.0-rc.1" + ] + }, + "@std/fs@1.0.1": { + "integrity": "d6914ca2c21abe591f733b31dbe6331e446815e513e2451b3b9e472daddfefcb", + "dependencies": [ + "jsr:@std/path@^1.0.2" + ] + }, + "@std/io@0.223.0": { + "integrity": "2d8c3c2ab3a515619b90da2c6ff5ea7b75a94383259ef4d02116b228393f84f1", + "dependencies": [ + "jsr:@std/assert@^0.223.0", + "jsr:@std/bytes@^0.223.0" + ] + }, + "@std/path@0.223.0": { + "integrity": "593963402d7e6597f5a6e620931661053572c982fc014000459edc1f93cc3989", + "dependencies": [ + "jsr:@std/assert@^0.223.0" + ] + }, + "@std/path@0.225.2": { + "integrity": "0f2db41d36b50ef048dcb0399aac720a5348638dd3cb5bf80685bf2a745aa506", + "dependencies": [ + "jsr:@std/assert@^0.226.0" + ] + }, + "@std/path@1.0.0-rc.1": { + "integrity": "b8c00ae2f19106a6bb7cbf1ab9be52aa70de1605daeb2dbdc4f87a7cbaf10ff6" + }, + "@std/path@1.0.2": { + "integrity": "a452174603f8c620bd278a380c596437a9eef50c891c64b85812f735245d9ec7" + }, "@std/yaml@0.224.3": { "integrity": "9da1ed0094f42ba24570b4d88a094b44a793ac7f2bc085c1939d3ac7e11cc0bb" + }, + "@ts-morph/bootstrap@0.24.0": { + "integrity": "a826a2ef7fa8a7c3f1042df2c034d20744d94da2ee32bf29275bcd4dffd3c060", + "dependencies": [ + "jsr:@ts-morph/common@^0.24.0" + ] + }, + "@ts-morph/common@0.24.0": { + "integrity": "12b625b8e562446ba658cdbe9ad77774b4bd96b992ae8bd34c60dbf24d06c1f3", + "dependencies": [ + "jsr:@std/fs@^0.229.3", + "jsr:@std/path@^0.225.2" + ] } }, "npm": { @@ -84,6 +200,10 @@ "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "dependencies": {} }, + "@esbuild/aix-ppc64@0.23.0": { + "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==", + "dependencies": {} + }, "@esbuild/android-arm64@0.20.0": { "integrity": "sha512-aVpnM4lURNkp0D3qPoAzSG92VXStYmoVPOgXveAUoQBWRSuQzt51yvSju29J6AHPmwY1BjH49uR29oyfH1ra8Q==", "dependencies": {} @@ -96,6 +216,10 @@ "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "dependencies": {} }, + "@esbuild/android-arm64@0.23.0": { + "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==", + "dependencies": {} + }, "@esbuild/android-arm@0.20.0": { "integrity": "sha512-3bMAfInvByLHfJwYPJRlpTeaQA75n8C/QKpEaiS4HrFWFiJlNI0vzq/zCjBrhAYcPyVPG7Eo9dMrcQXuqmNk5g==", "dependencies": {} @@ -108,6 +232,10 @@ "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "dependencies": {} }, + "@esbuild/android-arm@0.23.0": { + "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==", + "dependencies": {} + }, "@esbuild/android-x64@0.20.0": { "integrity": "sha512-uK7wAnlRvjkCPzh8jJ+QejFyrP8ObKuR5cBIsQZ+qbMunwR8sbd8krmMbxTLSrDhiPZaJYKQAU5Y3iMDcZPhyQ==", "dependencies": {} @@ -120,6 +248,10 @@ "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "dependencies": {} }, + "@esbuild/android-x64@0.23.0": { + "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==", + "dependencies": {} + }, "@esbuild/darwin-arm64@0.20.0": { "integrity": "sha512-AjEcivGAlPs3UAcJedMa9qYg9eSfU6FnGHJjT8s346HSKkrcWlYezGE8VaO2xKfvvlZkgAhyvl06OJOxiMgOYQ==", "dependencies": {} @@ -132,6 +264,10 @@ "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "dependencies": {} }, + "@esbuild/darwin-arm64@0.23.0": { + "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==", + "dependencies": {} + }, "@esbuild/darwin-x64@0.20.0": { "integrity": "sha512-bsgTPoyYDnPv8ER0HqnJggXK6RyFy4PH4rtsId0V7Efa90u2+EifxytE9pZnsDgExgkARy24WUQGv9irVbTvIw==", "dependencies": {} @@ -144,6 +280,10 @@ "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "dependencies": {} }, + "@esbuild/darwin-x64@0.23.0": { + "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==", + "dependencies": {} + }, "@esbuild/freebsd-arm64@0.20.0": { "integrity": "sha512-kQ7jYdlKS335mpGbMW5tEe3IrQFIok9r84EM3PXB8qBFJPSc6dpWfrtsC/y1pyrz82xfUIn5ZrnSHQQsd6jebQ==", "dependencies": {} @@ -156,6 +296,10 @@ "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "dependencies": {} }, + "@esbuild/freebsd-arm64@0.23.0": { + "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==", + "dependencies": {} + }, "@esbuild/freebsd-x64@0.20.0": { "integrity": "sha512-uG8B0WSepMRsBNVXAQcHf9+Ko/Tr+XqmK7Ptel9HVmnykupXdS4J7ovSQUIi0tQGIndhbqWLaIL/qO/cWhXKyQ==", "dependencies": {} @@ -168,6 +312,10 @@ "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "dependencies": {} }, + "@esbuild/freebsd-x64@0.23.0": { + "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==", + "dependencies": {} + }, "@esbuild/linux-arm64@0.20.0": { "integrity": "sha512-uTtyYAP5veqi2z9b6Gr0NUoNv9F/rOzI8tOD5jKcCvRUn7T60Bb+42NDBCWNhMjkQzI0qqwXkQGo1SY41G52nw==", "dependencies": {} @@ -180,6 +328,10 @@ "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "dependencies": {} }, + "@esbuild/linux-arm64@0.23.0": { + "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==", + "dependencies": {} + }, "@esbuild/linux-arm@0.20.0": { "integrity": "sha512-2ezuhdiZw8vuHf1HKSf4TIk80naTbP9At7sOqZmdVwvvMyuoDiZB49YZKLsLOfKIr77+I40dWpHVeY5JHpIEIg==", "dependencies": {} @@ -192,6 +344,10 @@ "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "dependencies": {} }, + "@esbuild/linux-arm@0.23.0": { + "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==", + "dependencies": {} + }, "@esbuild/linux-ia32@0.20.0": { "integrity": "sha512-c88wwtfs8tTffPaoJ+SQn3y+lKtgTzyjkD8NgsyCtCmtoIC8RDL7PrJU05an/e9VuAke6eJqGkoMhJK1RY6z4w==", "dependencies": {} @@ -204,6 +360,10 @@ "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "dependencies": {} }, + "@esbuild/linux-ia32@0.23.0": { + "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==", + "dependencies": {} + }, "@esbuild/linux-loong64@0.20.0": { "integrity": "sha512-lR2rr/128/6svngnVta6JN4gxSXle/yZEZL3o4XZ6esOqhyR4wsKyfu6qXAL04S4S5CgGfG+GYZnjFd4YiG3Aw==", "dependencies": {} @@ -216,6 +376,10 @@ "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "dependencies": {} }, + "@esbuild/linux-loong64@0.23.0": { + "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==", + "dependencies": {} + }, "@esbuild/linux-mips64el@0.20.0": { "integrity": "sha512-9Sycc+1uUsDnJCelDf6ZNqgZQoK1mJvFtqf2MUz4ujTxGhvCWw+4chYfDLPepMEvVL9PDwn6HrXad5yOrNzIsQ==", "dependencies": {} @@ -228,6 +392,10 @@ "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "dependencies": {} }, + "@esbuild/linux-mips64el@0.23.0": { + "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==", + "dependencies": {} + }, "@esbuild/linux-ppc64@0.20.0": { "integrity": "sha512-CoWSaaAXOZd+CjbUTdXIJE/t7Oz+4g90A3VBCHLbfuc5yUQU/nFDLOzQsN0cdxgXd97lYW/psIIBdjzQIwTBGw==", "dependencies": {} @@ -240,6 +408,10 @@ "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "dependencies": {} }, + "@esbuild/linux-ppc64@0.23.0": { + "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==", + "dependencies": {} + }, "@esbuild/linux-riscv64@0.20.0": { "integrity": "sha512-mlb1hg/eYRJUpv8h/x+4ShgoNLL8wgZ64SUr26KwglTYnwAWjkhR2GpoKftDbPOCnodA9t4Y/b68H4J9XmmPzA==", "dependencies": {} @@ -252,6 +424,10 @@ "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "dependencies": {} }, + "@esbuild/linux-riscv64@0.23.0": { + "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==", + "dependencies": {} + }, "@esbuild/linux-s390x@0.20.0": { "integrity": "sha512-fgf9ubb53xSnOBqyvWEY6ukBNRl1mVX1srPNu06B6mNsNK20JfH6xV6jECzrQ69/VMiTLvHMicQR/PgTOgqJUQ==", "dependencies": {} @@ -264,6 +440,10 @@ "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "dependencies": {} }, + "@esbuild/linux-s390x@0.23.0": { + "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==", + "dependencies": {} + }, "@esbuild/linux-x64@0.20.0": { "integrity": "sha512-H9Eu6MGse++204XZcYsse1yFHmRXEWgadk2N58O/xd50P9EvFMLJTQLg+lB4E1cF2xhLZU5luSWtGTb0l9UeSg==", "dependencies": {} @@ -276,6 +456,10 @@ "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "dependencies": {} }, + "@esbuild/linux-x64@0.23.0": { + "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==", + "dependencies": {} + }, "@esbuild/netbsd-x64@0.20.0": { "integrity": "sha512-lCT675rTN1v8Fo+RGrE5KjSnfY0x9Og4RN7t7lVrN3vMSjy34/+3na0q7RIfWDAj0e0rCh0OL+P88lu3Rt21MQ==", "dependencies": {} @@ -288,6 +472,14 @@ "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "dependencies": {} }, + "@esbuild/netbsd-x64@0.23.0": { + "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==", + "dependencies": {} + }, + "@esbuild/openbsd-arm64@0.23.0": { + "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==", + "dependencies": {} + }, "@esbuild/openbsd-x64@0.20.0": { "integrity": "sha512-HKoUGXz/TOVXKQ+67NhxyHv+aDSZf44QpWLa3I1lLvAwGq8x1k0T+e2HHSRvxWhfJrFxaaqre1+YyzQ99KixoA==", "dependencies": {} @@ -300,6 +492,10 @@ "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "dependencies": {} }, + "@esbuild/openbsd-x64@0.23.0": { + "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==", + "dependencies": {} + }, "@esbuild/sunos-x64@0.20.0": { "integrity": "sha512-GDwAqgHQm1mVoPppGsoq4WJwT3vhnz/2N62CzhvApFD1eJyTroob30FPpOZabN+FgCjhG+AgcZyOPIkR8dfD7g==", "dependencies": {} @@ -312,6 +508,10 @@ "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "dependencies": {} }, + "@esbuild/sunos-x64@0.23.0": { + "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==", + "dependencies": {} + }, "@esbuild/win32-arm64@0.20.0": { "integrity": "sha512-0vYsP8aC4TvMlOQYozoksiaxjlvUcQrac+muDqj1Fxy6jh9l9CZJzj7zmh8JGfiV49cYLTorFLxg7593pGldwQ==", "dependencies": {} @@ -324,6 +524,10 @@ "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "dependencies": {} }, + "@esbuild/win32-arm64@0.23.0": { + "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==", + "dependencies": {} + }, "@esbuild/win32-ia32@0.20.0": { "integrity": "sha512-p98u4rIgfh4gdpV00IqknBD5pC84LCub+4a3MO+zjqvU5MVXOc3hqR2UgT2jI2nh3h8s9EQxmOsVI3tyzv1iFg==", "dependencies": {} @@ -336,6 +540,10 @@ "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "dependencies": {} }, + "@esbuild/win32-ia32@0.23.0": { + "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==", + "dependencies": {} + }, "@esbuild/win32-x64@0.20.0": { "integrity": "sha512-NgJnesu1RtWihtTtXGFMU5YSE6JyyHPMxCwBZK7a6/8d31GuSo9l0Ss7w1Jw5QnKUawG6UEehs883kcXf5fYwg==", "dependencies": {} @@ -348,6 +556,10 @@ "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "dependencies": {} }, + "@esbuild/win32-x64@0.23.0": { + "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==", + "dependencies": {} + }, "@fastify/busboy@2.1.1": { "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", "dependencies": {} @@ -681,6 +893,35 @@ "@esbuild/win32-x64": "@esbuild/win32-x64@0.21.5" } }, + "esbuild@0.23.0": { + "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==", + "dependencies": { + "@esbuild/aix-ppc64": "@esbuild/aix-ppc64@0.23.0", + "@esbuild/android-arm": "@esbuild/android-arm@0.23.0", + "@esbuild/android-arm64": "@esbuild/android-arm64@0.23.0", + "@esbuild/android-x64": "@esbuild/android-x64@0.23.0", + "@esbuild/darwin-arm64": "@esbuild/darwin-arm64@0.23.0", + "@esbuild/darwin-x64": "@esbuild/darwin-x64@0.23.0", + "@esbuild/freebsd-arm64": "@esbuild/freebsd-arm64@0.23.0", + "@esbuild/freebsd-x64": "@esbuild/freebsd-x64@0.23.0", + "@esbuild/linux-arm": "@esbuild/linux-arm@0.23.0", + "@esbuild/linux-arm64": "@esbuild/linux-arm64@0.23.0", + "@esbuild/linux-ia32": "@esbuild/linux-ia32@0.23.0", + "@esbuild/linux-loong64": "@esbuild/linux-loong64@0.23.0", + "@esbuild/linux-mips64el": "@esbuild/linux-mips64el@0.23.0", + "@esbuild/linux-ppc64": "@esbuild/linux-ppc64@0.23.0", + "@esbuild/linux-riscv64": "@esbuild/linux-riscv64@0.23.0", + "@esbuild/linux-s390x": "@esbuild/linux-s390x@0.23.0", + "@esbuild/linux-x64": "@esbuild/linux-x64@0.23.0", + "@esbuild/netbsd-x64": "@esbuild/netbsd-x64@0.23.0", + "@esbuild/openbsd-arm64": "@esbuild/openbsd-arm64@0.23.0", + "@esbuild/openbsd-x64": "@esbuild/openbsd-x64@0.23.0", + "@esbuild/sunos-x64": "@esbuild/sunos-x64@0.23.0", + "@esbuild/win32-arm64": "@esbuild/win32-arm64@0.23.0", + "@esbuild/win32-ia32": "@esbuild/win32-ia32@0.23.0", + "@esbuild/win32-x64": "@esbuild/win32-x64@0.23.0" + } + }, "once@1.4.0": { "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dependencies": { diff --git a/dist/post.js b/dist/post.js index 2bb9778..9307904 100644 --- a/dist/post.js +++ b/dist/post.js @@ -297,11 +297,11 @@ var init_parse = __esm({ }); // npm/node_modules/uuid/dist/esm-node/v35.js -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); +function stringToBytes(str2) { + str2 = unescape(encodeURIComponent(str2)); const bytes = []; - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); + for (let i = 0; i < str2.length; ++i) { + bytes.push(str2.charCodeAt(i)); } return bytes; } @@ -560,10 +560,10 @@ var require_proxy = __commonJS({ })(); if (proxyVar) { try { - return new URL(proxyVar); + return new DecodedURL(proxyVar); } catch (_a) { if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new URL(`http://${proxyVar}`); + return new DecodedURL(`http://${proxyVar}`); } } else { return void 0; @@ -606,6 +606,19 @@ var require_proxy = __commonJS({ const hostLower = host.toLowerCase(); return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } + var DecodedURL = class extends URL { + constructor(url, base) { + super(url, base); + this._decodedUsername = decodeURIComponent(super.username); + this._decodedPassword = decodeURIComponent(super.password); + } + get username() { + return this._decodedUsername; + } + get password() { + return this._decodedPassword; + } + }; } }); @@ -649,44 +662,44 @@ var require_tunnel = __commonJS({ return agent; } function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - self.on("free", function onFree(socket, host, port, localAddress) { + var self2 = this; + self2.options = options || {}; + self2.proxyOptions = self2.options.proxy || {}; + self2.maxSockets = self2.options.maxSockets || http.Agent.defaultMaxSockets; + self2.requests = []; + self2.sockets = []; + self2.on("free", function onFree(socket, host, port, localAddress) { var options2 = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; + for (var i = 0, len = self2.requests.length; i < len; ++i) { + var pending = self2.requests[i]; if (pending.host === options2.host && pending.port === options2.port) { - self.requests.splice(i, 1); + self2.requests.splice(i, 1); pending.request.onSocket(socket); return; } } socket.destroy(); - self.removeSocket(socket); + self2.removeSocket(socket); }); } util.inherits(TunnelingAgent, events.EventEmitter); TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({ request: req }, self.options, toOptions(host, port, localAddress)); - if (self.sockets.length >= this.maxSockets) { - self.requests.push(options); + var self2 = this; + var options = mergeOptions({ request: req }, self2.options, toOptions(host, port, localAddress)); + if (self2.sockets.length >= this.maxSockets) { + self2.requests.push(options); return; } - self.createSocket(options, function(socket) { + self2.createSocket(options, function(socket) { socket.on("free", onFree); socket.on("close", onCloseOrRemove); socket.on("agentRemove", onCloseOrRemove); req.onSocket(socket); function onFree() { - self.emit("free", socket, options); + self2.emit("free", socket, options); } function onCloseOrRemove(err) { - self.removeSocket(socket); + self2.removeSocket(socket); socket.removeListener("free", onFree); socket.removeListener("close", onCloseOrRemove); socket.removeListener("agentRemove", onCloseOrRemove); @@ -694,10 +707,10 @@ var require_tunnel = __commonJS({ }); }; TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; + var self2 = this; var placeholder = {}; - self.sockets.push(placeholder); - var connectOptions = mergeOptions({}, self.proxyOptions, { + self2.sockets.push(placeholder); + var connectOptions = mergeOptions({}, self2.proxyOptions, { method: "CONNECT", path: options.host + ":" + options.port, agent: false, @@ -713,7 +726,7 @@ var require_tunnel = __commonJS({ connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } debug2("making CONNECT request"); - var connectReq = self.request(connectOptions); + var connectReq = self2.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); connectReq.once("upgrade", onUpgrade); @@ -740,7 +753,7 @@ var require_tunnel = __commonJS({ var error = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); error.code = "ECONNRESET"; options.request.emit("error", error); - self.removeSocket(placeholder); + self2.removeSocket(placeholder); return; } if (head.length > 0) { @@ -749,11 +762,11 @@ var require_tunnel = __commonJS({ var error = new Error("got illegal response body from proxy"); error.code = "ECONNRESET"; options.request.emit("error", error); - self.removeSocket(placeholder); + self2.removeSocket(placeholder); return; } debug2("tunneling connection has established"); - self.sockets[self.sockets.indexOf(placeholder)] = socket; + self2.sockets[self2.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { @@ -766,7 +779,7 @@ var require_tunnel = __commonJS({ var error = new Error("tunneling socket could not be established, cause=" + cause.message); error.code = "ECONNRESET"; options.request.emit("error", error); - self.removeSocket(placeholder); + self2.removeSocket(placeholder); } }; TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { @@ -783,15 +796,15 @@ var require_tunnel = __commonJS({ } }; function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var self2 = this; + TunnelingAgent.prototype.createSocket.call(self2, options, function(socket) { var hostHeader = options.request.getHeader("host"); - var tlsOptions = mergeOptions({}, self.options, { + var tlsOptions = mergeOptions({}, self2.options, { socket, servername: hostHeader ? hostHeader.replace(/:.*$/, "") : options.host }); var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; + self2.sockets[self2.sockets.indexOf(socket)] = secureSocket; cb(secureSocket); }); } @@ -1507,8 +1520,8 @@ var require_util = __commonJS({ }; } async function* convertIterableToBuffer(iterable) { - for await (const chunk of iterable) { - yield Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk); + for await (const chunk2 of iterable) { + yield Buffer.isBuffer(chunk2) ? chunk2 : Buffer.from(chunk2); } } var ReadableStream; @@ -1748,15 +1761,15 @@ var require_sbmh = __commonJS({ this.matches = 0; this._bufpos = 0; }; - SBMH.prototype.push = function(chunk, pos) { - if (!Buffer.isBuffer(chunk)) { - chunk = Buffer.from(chunk, "binary"); + SBMH.prototype.push = function(chunk2, pos) { + if (!Buffer.isBuffer(chunk2)) { + chunk2 = Buffer.from(chunk2, "binary"); } - const chlen = chunk.length; + const chlen = chunk2.length; this._bufpos = pos || 0; let r; while (r !== chlen && this.matches < this.maxMatches) { - r = this._sbmh_feed(chunk); + r = this._sbmh_feed(chunk2); } return r; }; @@ -1894,7 +1907,7 @@ var require_HeaderParser = __commonJS({ function HeaderParser(cfg) { EventEmitter.call(this); cfg = cfg || {}; - const self = this; + const self2 = this; this.nread = 0; this.maxed = false; this.npairs = 0; @@ -1905,18 +1918,18 @@ var require_HeaderParser = __commonJS({ this.finished = false; this.ss = new StreamSearch(B_DCRLF); this.ss.on("info", function(isMatch, data, start, end) { - if (data && !self.maxed) { - if (self.nread + end - start >= self.maxHeaderSize) { - end = self.maxHeaderSize - self.nread + start; - self.nread = self.maxHeaderSize; - self.maxed = true; + if (data && !self2.maxed) { + if (self2.nread + end - start >= self2.maxHeaderSize) { + end = self2.maxHeaderSize - self2.nread + start; + self2.nread = self2.maxHeaderSize; + self2.maxed = true; } else { - self.nread += end - start; + self2.nread += end - start; } - self.buffer += data.toString("binary", start, end); + self2.buffer += data.toString("binary", start, end); } if (isMatch) { - self._finish(); + self2._finish(); } }); } @@ -2021,34 +2034,34 @@ var require_Dicer = __commonJS({ this._ignoreData = false; this._partOpts = { highWaterMark: cfg.partHwm }; this._pause = false; - const self = this; + const self2 = this; this._hparser = new HeaderParser(cfg); this._hparser.on("header", function(header) { - self._inHeader = false; - self._part.emit("header", header); + self2._inHeader = false; + self2._part.emit("header", header); }); } inherits(Dicer, WritableStream); Dicer.prototype.emit = function(ev) { if (ev === "finish" && !this._realFinish) { if (!this._finished) { - const self = this; + const self2 = this; process.nextTick(function() { - self.emit("error", new Error("Unexpected end of multipart data")); - if (self._part && !self._ignoreData) { - const type = self._isPreamble ? "Preamble" : "Part"; - self._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); - self._part.push(null); + self2.emit("error", new Error("Unexpected end of multipart data")); + if (self2._part && !self2._ignoreData) { + const type = self2._isPreamble ? "Preamble" : "Part"; + self2._part.emit("error", new Error(type + " terminated early due to unexpected end of multipart data")); + self2._part.push(null); process.nextTick(function() { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; }); return; } - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; }); } } else { @@ -2092,10 +2105,10 @@ var require_Dicer = __commonJS({ this._hparser = void 0; }; Dicer.prototype.setBoundary = function(boundary) { - const self = this; + const self2 = this; this._bparser = new StreamSearch("\r\n--" + boundary); this._bparser.on("info", function(isMatch, data, start, end) { - self._oninfo(isMatch, data, start, end); + self2._oninfo(isMatch, data, start, end); }); }; Dicer.prototype._ignore = function() { @@ -2107,7 +2120,7 @@ var require_Dicer = __commonJS({ }; Dicer.prototype._oninfo = function(isMatch, data, start, end) { let buf; - const self = this; + const self2 = this; let i = 0; let r; let shouldWriteMore = true; @@ -2130,10 +2143,10 @@ var require_Dicer = __commonJS({ } this.reset(); this._finished = true; - if (self._parts === 0) { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; + if (self2._parts === 0) { + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; } } if (this._dashes) { @@ -2146,7 +2159,7 @@ var require_Dicer = __commonJS({ if (!this._part) { this._part = new PartStream(this._partOpts); this._part._read = function(n) { - self._unpause(); + self2._unpause(); }; if (this._isPreamble && this.listenerCount("preamble") !== 0) { this.emit("preamble", this._part); @@ -2186,13 +2199,13 @@ var require_Dicer = __commonJS({ if (start !== end) { ++this._parts; this._part.on("end", function() { - if (--self._parts === 0) { - if (self._finished) { - self._realFinish = true; - self.emit("finish"); - self._realFinish = false; + if (--self2._parts === 0) { + if (self2._finished) { + self2._realFinish = true; + self2.emit("finish"); + self2._realFinish = false; } else { - self._unpause(); + self2._unpause(); } } }); @@ -2827,7 +2840,7 @@ var require_parseParams = __commonJS({ var STATE_VALUE = 1; var STATE_CHARSET = 2; var STATE_LANG = 3; - function parseParams(str) { + function parseParams(str2) { const res = []; let state = STATE_KEY; let charset = ""; @@ -2835,9 +2848,9 @@ var require_parseParams = __commonJS({ let escaping = false; let p = 0; let tmp = ""; - const len = str.length; + const len = str2.length; for (var i = 0; i < len; ++i) { - const char = str[i]; + const char = str2[i]; if (char === "\\" && inquote) { if (escaping) { escaping = false; @@ -2967,7 +2980,7 @@ var require_multipart = __commonJS({ function Multipart(boy, cfg) { let i; let len; - const self = this; + const self2 = this; let boundary; const limits = cfg.limits; const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => contentType === "application/octet-stream" || fileName !== void 0); @@ -2984,7 +2997,7 @@ var require_multipart = __commonJS({ function checkFinished() { if (nends === 0 && finished && !boy._done) { finished = false; - self.end(); + self2.end(); } } if (typeof boundary !== "string") { @@ -3017,16 +3030,16 @@ var require_multipart = __commonJS({ }; this.parser = new Dicer(parserCfg); this.parser.on("drain", function() { - self._needDrain = false; - if (self._cb && !self._pause) { - const cb = self._cb; - self._cb = void 0; + self2._needDrain = false; + if (self2._cb && !self2._pause) { + const cb = self2._cb; + self2._cb = void 0; cb(); } }).on("part", function onPart(part) { - if (++self._nparts > partsLimit) { - self.parser.removeListener("part", onPart); - self.parser.on("part", skipPart); + if (++self2._nparts > partsLimit) { + self2.parser.removeListener("part", onPart); + self2.parser.on("part", skipPart); boy.hitPartsLimit = true; boy.emit("partsLimit"); return skipPart(part); @@ -3096,7 +3109,7 @@ var require_multipart = __commonJS({ } ++nfiles; if (boy.listenerCount("file") === 0) { - self.parser._ignore(); + self2.parser._ignore(); return; } ++nends; @@ -3104,22 +3117,22 @@ var require_multipart = __commonJS({ curFile = file; file.on("end", function() { --nends; - self._pause = false; + self2._pause = false; checkFinished(); - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = void 0; + if (self2._cb && !self2._needDrain) { + const cb = self2._cb; + self2._cb = void 0; cb(); } }); file._read = function(n) { - if (!self._pause) { + if (!self2._pause) { return; } - self._pause = false; - if (self._cb && !self._needDrain) { - const cb = self._cb; - self._cb = void 0; + self2._pause = false; + if (self2._cb && !self2._needDrain) { + const cb = self2._cb; + self2._cb = void 0; cb(); } }; @@ -3136,7 +3149,7 @@ var require_multipart = __commonJS({ file.emit("limit"); return; } else if (!file.push(data)) { - self._pause = true; + self2._pause = true; } file.bytesRead = nsize; }; @@ -3192,8 +3205,8 @@ var require_multipart = __commonJS({ checkFinished(); }); } - Multipart.prototype.write = function(chunk, cb) { - const r = this.parser.write(chunk); + Multipart.prototype.write = function(chunk2, cb) { + const r = this.parser.write(chunk2); if (r && !this._pause) { cb(); } else { @@ -3202,13 +3215,13 @@ var require_multipart = __commonJS({ } }; Multipart.prototype.end = function() { - const self = this; - if (self.parser.writable) { - self.parser.end(); - } else if (!self._boy._done) { + const self2 = this; + if (self2.parser.writable) { + self2.parser.end(); + } else if (!self2._boy._done) { process.nextTick(function() { - self._boy._done = true; - self._boy.emit("finish"); + self2._boy._done = true; + self2._boy.emit("finish"); }); } }; @@ -3365,29 +3378,29 @@ var require_Decoder = __commonJS({ function Decoder() { this.buffer = void 0; } - Decoder.prototype.write = function(str) { - str = str.replace(RE_PLUS, " "); + Decoder.prototype.write = function(str2) { + str2 = str2.replace(RE_PLUS, " "); let res = ""; let i = 0; let p = 0; - const len = str.length; + const len = str2.length; for (; i < len; ++i) { if (this.buffer !== void 0) { - if (!HEX[str.charCodeAt(i)]) { + if (!HEX[str2.charCodeAt(i)]) { res += "%" + this.buffer; this.buffer = void 0; --i; } else { - this.buffer += str[i]; + this.buffer += str2[i]; ++p; if (this.buffer.length === 2) { res += String.fromCharCode(parseInt(this.buffer, 16)); this.buffer = void 0; } } - } else if (str[i] === "%") { + } else if (str2[i] === "%") { if (i > p) { - res += str.substring(p, i); + res += str2.substring(p, i); p = i; } this.buffer = ""; @@ -3395,7 +3408,7 @@ var require_Decoder = __commonJS({ } } if (p < len && this.buffer === void 0) { - res += str.substring(p); + res += str2.substring(p); } return res; }; @@ -3690,8 +3703,8 @@ var require_main = __commonJS({ } throw new Error("Unsupported Content-Type."); }; - Busboy.prototype._write = function(chunk, encoding, cb) { - this._parser.write(chunk, cb); + Busboy.prototype._write = function(chunk2, encoding, cb) { + this._parser.write(chunk2, cb); }; module2.exports = Busboy; module2.exports.default = Busboy; @@ -4458,15 +4471,15 @@ var require_util2 = __commonJS({ const bytes = []; let byteLength = 0; while (true) { - const { done, value: chunk } = await reader.read(); + const { done, value: chunk2 } = await reader.read(); if (done) { return Buffer.concat(bytes, byteLength); } - if (!isUint8Array(chunk)) { + if (!isUint8Array(chunk2)) { throw new TypeError("Received non-Uint8Array chunk"); } - bytes.push(chunk); - byteLength += chunk.length; + bytes.push(chunk2); + byteLength += chunk2.length; } } function urlIsLocal(url) { @@ -4485,7 +4498,7 @@ var require_util2 = __commonJS({ const protocol = url.protocol; return protocol === "http:" || protocol === "https:"; } - var hasOwn2 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); + var hasOwn7 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); module2.exports = { isAborted, isCancelled, @@ -4518,7 +4531,7 @@ var require_util2 = __commonJS({ makeIterator, isValidHeaderName, isValidHeaderValue, - hasOwn: hasOwn2, + hasOwn: hasOwn7, isErrorLike, fullyReadBody, bytesMatch, @@ -4556,7 +4569,7 @@ var require_webidl = __commonJS({ "npm/node_modules/undici/lib/fetch/webidl.js"(exports2, module2) { "use strict"; var { types } = require("util"); - var { hasOwn: hasOwn2, toUSVString } = require_util2(); + var { hasOwn: hasOwn7, toUSVString } = require_util2(); var webidl = {}; webidl.converters = {}; webidl.util = {}; @@ -4694,7 +4707,7 @@ var require_webidl = __commonJS({ }); } const method = V?.[Symbol.iterator]?.(); - const seq = []; + const seq2 = []; if (method === void 0 || typeof method.next !== "function") { throw webidl.errors.exception({ header: "Sequence", @@ -4706,9 +4719,9 @@ var require_webidl = __commonJS({ if (done) { break; } - seq.push(converter(value)); + seq2.push(converter(value)); } - return seq; + return seq2; }; }; webidl.recordConverter = function(keyConverter, valueConverter) { @@ -4767,7 +4780,7 @@ var require_webidl = __commonJS({ for (const options of converters) { const { key, defaultValue, required, converter } = options; if (required === true) { - if (!hasOwn2(dictionary, key)) { + if (!hasOwn7(dictionary, key)) { throw webidl.errors.exception({ header: "Dictionary", message: `Missing required key "${key}".` @@ -4775,7 +4788,7 @@ var require_webidl = __commonJS({ } } let value = dictionary[key]; - const hasDefault = hasOwn2(options, "defaultValue"); + const hasDefault = hasOwn7(options, "defaultValue"); if (hasDefault && value !== null) { value = value ?? defaultValue; } @@ -4926,7 +4939,7 @@ var require_dataURL = __commonJS({ var assert = require("assert"); var { atob: atob2 } = require("buffer"); var { isomorphicDecode } = require_util2(); - var encoder = new TextEncoder(); + var encoder2 = new TextEncoder(); var HTTP_TOKEN_CODEPOINTS = /^[!#$%&'*+-.^_|~A-Za-z0-9]+$/; var HTTP_WHITESPACE_REGEX = /(\u000A|\u000D|\u0009|\u0020)/; var HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/; @@ -4994,7 +5007,7 @@ var require_dataURL = __commonJS({ return input.slice(start, position.position); } function stringPercentDecode(input) { - const bytes = encoder.encode(input); + const bytes = encoder2.encode(input); return percentDecode(bytes); } function percentDecode(input) { @@ -5107,10 +5120,10 @@ var require_dataURL = __commonJS({ if (/[^+/0-9A-Za-z]/.test(data)) { return "failure"; } - const binary = atob2(data); - const bytes = new Uint8Array(binary.length); - for (let byte = 0; byte < binary.length; byte++) { - bytes[byte] = binary.charCodeAt(byte); + const binary2 = atob2(data); + const bytes = new Uint8Array(binary2.length); + for (let byte = 0; byte < binary2.length; byte++) { + bytes[byte] = binary2.charCodeAt(byte); } return bytes; } @@ -5167,30 +5180,30 @@ var require_dataURL = __commonJS({ function isHTTPWhiteSpace(char) { return char === "\r" || char === "\n" || char === " " || char === " "; } - function removeHTTPWhitespace(str, leading = true, trailing = true) { + function removeHTTPWhitespace(str2, leading = true, trailing = true) { let lead = 0; - let trail = str.length - 1; + let trail = str2.length - 1; if (leading) { - for (; lead < str.length && isHTTPWhiteSpace(str[lead]); lead++) ; + for (; lead < str2.length && isHTTPWhiteSpace(str2[lead]); lead++) ; } if (trailing) { - for (; trail > 0 && isHTTPWhiteSpace(str[trail]); trail--) ; + for (; trail > 0 && isHTTPWhiteSpace(str2[trail]); trail--) ; } - return str.slice(lead, trail + 1); + return str2.slice(lead, trail + 1); } function isASCIIWhitespace(char) { return char === "\r" || char === "\n" || char === " " || char === "\f" || char === " "; } - function removeASCIIWhitespace(str, leading = true, trailing = true) { + function removeASCIIWhitespace(str2, leading = true, trailing = true) { let lead = 0; - let trail = str.length - 1; + let trail = str2.length - 1; if (leading) { - for (; lead < str.length && isASCIIWhitespace(str[lead]); lead++) ; + for (; lead < str2.length && isASCIIWhitespace(str2[lead]); lead++) ; } if (trailing) { - for (; trail > 0 && isASCIIWhitespace(str[trail]); trail--) ; + for (; trail > 0 && isASCIIWhitespace(str2[trail]); trail--) ; } - return str.slice(lead, trail + 1); + return str2.slice(lead, trail + 1); } module2.exports = { dataURLProcessor, @@ -5216,7 +5229,7 @@ var require_file = __commonJS({ var { webidl } = require_webidl(); var { parseMIMEType, serializeAMimeType } = require_dataURL(); var { kEnumerableProperty } = require_util(); - var encoder = new TextEncoder(); + var encoder2 = new TextEncoder(); var File = class _File extends Blob2 { constructor(fileBits, fileName, options = {}) { webidl.argumentLengthCheck(arguments, 2, { header: "File constructor" }); @@ -5362,7 +5375,7 @@ var require_file = __commonJS({ if (options.endings === "native") { s = convertLineEndingsNative(s); } - bytes.push(encoder.encode(s)); + bytes.push(encoder2.encode(s)); } else if (types.isAnyArrayBuffer(element) || types.isTypedArray(element)) { if (!element.buffer) { bytes.push(new Uint8Array(element)); @@ -5574,8 +5587,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var ReadableStream = globalThis.ReadableStream; var File = NativeFile ?? UndiciFile; - var textEncoder = new TextEncoder(); - var textDecoder = new TextDecoder(); + var textEncoder2 = new TextEncoder(); + var textDecoder2 = new TextDecoder(); function extractBody(object, keepalive = false) { if (!ReadableStream) { ReadableStream = require("stream/web").ReadableStream; @@ -5589,7 +5602,7 @@ var require_body = __commonJS({ stream = new ReadableStream({ async pull(controller) { controller.enqueue( - typeof source === "string" ? textEncoder.encode(source) : source + typeof source === "string" ? textEncoder2.encode(source) : source ); queueMicrotask(() => readableStreamClose(controller)); }, @@ -5617,7 +5630,7 @@ var require_body = __commonJS({ const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r Content-Disposition: form-data`; - const escape = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); + const escape = (str2) => str2.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22"); const normalizeLinefeeds = (value) => value.replace(/\r?\n|\r/g, "\r\n"); const blobParts = []; const rn = new Uint8Array([13, 10]); @@ -5625,28 +5638,28 @@ Content-Disposition: form-data`; let hasUnknownSizeValue = false; for (const [name, value] of object) { if (typeof value === "string") { - const chunk2 = textEncoder.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r + const chunk3 = textEncoder2.encode(prefix + `; name="${escape(normalizeLinefeeds(name))}"\r \r ${normalizeLinefeeds(value)}\r `); - blobParts.push(chunk2); - length += chunk2.byteLength; + blobParts.push(chunk3); + length += chunk3.byteLength; } else { - const chunk2 = textEncoder.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r + const chunk3 = textEncoder2.encode(`${prefix}; name="${escape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${escape(value.name)}"` : "") + `\r Content-Type: ${value.type || "application/octet-stream"}\r \r `); - blobParts.push(chunk2, value, rn); + blobParts.push(chunk3, value, rn); if (typeof value.size === "number") { - length += chunk2.byteLength + value.size + rn.byteLength; + length += chunk3.byteLength + value.size + rn.byteLength; } else { hasUnknownSizeValue = true; } } } - const chunk = textEncoder.encode(`--${boundary}--`); - blobParts.push(chunk); - length += chunk.byteLength; + const chunk2 = textEncoder2.encode(`--${boundary}--`); + blobParts.push(chunk2); + length += chunk2.byteLength; if (hasUnknownSizeValue) { length = null; } @@ -5800,8 +5813,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r const chunks = []; if (encoding === "base64" || encoding.toLowerCase() === "base64") { let base64chunk = ""; - value.on("data", (chunk) => { - base64chunk += chunk.toString().replace(/[\r\n]/gm, ""); + value.on("data", (chunk2) => { + base64chunk += chunk2.toString().replace(/[\r\n]/gm, ""); const end = base64chunk.length - base64chunk.length % 4; chunks.push(Buffer.from(base64chunk.slice(0, end), "base64")); base64chunk = base64chunk.slice(end); @@ -5811,8 +5824,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r responseFormData.append(name, new File(chunks, filename, { type: mimeType })); }); } else { - value.on("data", (chunk) => { - chunks.push(chunk); + value.on("data", (chunk2) => { + chunks.push(chunk2); }); value.on("end", () => { responseFormData.append(name, new File(chunks, filename, { type: mimeType })); @@ -5823,7 +5836,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r busboy.on("finish", resolve); busboy.on("error", (err) => reject(new TypeError(err))); }); - if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk); + if (this.body !== null) for await (const chunk2 of consumeBody(this[kState].body)) busboy.write(chunk2); busboy.end(); await busboyResolve; return responseFormData; @@ -5832,11 +5845,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r try { let text = ""; const streamingDecoder = new TextDecoder("utf-8", { ignoreBOM: true }); - for await (const chunk of consumeBody(this[kState].body)) { - if (!isUint8Array(chunk)) { + for await (const chunk2 of consumeBody(this[kState].body)) { + if (!isUint8Array(chunk2)) { throw new TypeError("Expected Uint8Array chunk"); } - text += streamingDecoder.decode(chunk, { stream: true }); + text += streamingDecoder.decode(chunk2, { stream: true }); } text += streamingDecoder.decode(); entries = new URLSearchParams(text); @@ -5895,7 +5908,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { buffer = buffer.subarray(3); } - const output = textDecoder.decode(buffer); + const output = textDecoder2.decode(buffer); return output; } function parseJSONFromBytes(bytes) { @@ -6085,10 +6098,10 @@ var require_request = __commonJS({ channels.create.publish({ request: this }); } } - onBodySent(chunk) { + onBodySent(chunk2) { if (this[kHandler].onBodySent) { try { - return this[kHandler].onBodySent(chunk); + return this[kHandler].onBodySent(chunk2); } catch (err) { this.abort(err); } @@ -6128,11 +6141,11 @@ var require_request = __commonJS({ this.abort(err); } } - onData(chunk) { + onData(chunk2) { assert(!this.aborted); assert(!this.completed); try { - return this[kHandler].onData(chunk); + return this[kHandler].onData(chunk2); } catch (err) { this.abort(err); return false; @@ -7051,10 +7064,10 @@ var require_RedirectHandler = __commonJS({ this.opts.body = null; } } - onData(chunk) { + onData(chunk2) { if (this.location) { } else { - return this.handler.onData(chunk); + return this.handler.onData(chunk2); } } onComplete(trailers) { @@ -7066,9 +7079,9 @@ var require_RedirectHandler = __commonJS({ this.handler.onComplete(trailers); } } - onBodySent(chunk) { + onBodySent(chunk2) { if (this.handler.onBodySent) { - this.handler.onBodySent(chunk); + this.handler.onBodySent(chunk2); } } }; @@ -7472,7 +7485,7 @@ var require_client = __commonJS({ const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; - errorRequest(this, request2, err); + errorRequest2(this, request2, err); } const callback = () => { if (this[kClosedResolve]) { @@ -7521,12 +7534,12 @@ var require_client = __commonJS({ const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; - errorRequest(this, request2, err); + errorRequest2(this, request2, err); } } else if (client[kRunning] > 0) { const request2 = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; - errorRequest(client, request2, err); + errorRequest2(client, request2, err); } client[kPendingIdx] = client[kRunningIdx]; assert(client[kRunning] === 0); @@ -7664,11 +7677,11 @@ var require_client = __commonJS({ } readMore() { while (!this.paused && this.ptr) { - const chunk = this.socket.read(); - if (chunk === null) { + const chunk2 = this.socket.read(); + if (chunk2 === null) { break; } - this.execute(chunk); + this.execute(chunk2); } } execute(data) { @@ -7990,7 +8003,7 @@ var require_client = __commonJS({ const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; - errorRequest(client, request2, err); + errorRequest2(client, request2, err); } assert(client[kSize] === 0); } @@ -8021,12 +8034,12 @@ var require_client = __commonJS({ const requests = client[kQueue].splice(client[kRunningIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; - errorRequest(client, request2, err); + errorRequest2(client, request2, err); } } else if (client[kRunning] > 0 && err.code !== "UND_ERR_INFO") { const request2 = client[kQueue][client[kRunningIdx]]; client[kQueue][client[kRunningIdx]++] = null; - errorRequest(client, request2, err); + errorRequest2(client, request2, err); } client[kPendingIdx] = client[kRunningIdx]; assert(client[kRunning] === 0); @@ -8160,7 +8173,7 @@ var require_client = __commonJS({ assert(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request2 = client[kQueue][client[kPendingIdx]++]; - errorRequest(client, request2, err); + errorRequest2(client, request2, err); } } else { onError(client, err); @@ -8297,7 +8310,7 @@ var require_client = __commonJS({ } if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength !== null && request2.contentLength !== contentLength) { if (client[kStrictContentLength]) { - errorRequest(client, request2, new RequestContentLengthMismatchError()); + errorRequest2(client, request2, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); @@ -8308,11 +8321,11 @@ var require_client = __commonJS({ if (request2.aborted || request2.completed) { return; } - errorRequest(client, request2, err || new RequestAbortedError()); + errorRequest2(client, request2, err || new RequestAbortedError()); util.destroy(socket, new InformationalError("aborted")); }); } catch (err) { - errorRequest(client, request2, err); + errorRequest2(client, request2, err); } if (request2.aborted) { return false; @@ -8400,7 +8413,7 @@ upgrade: ${upgrade}\r if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; if (upgrade) { - errorRequest(client, request2, new Error("Upgrade not supported for H2")); + errorRequest2(client, request2, new Error("Upgrade not supported for H2")); return false; } try { @@ -8408,10 +8421,10 @@ upgrade: ${upgrade}\r if (request2.aborted || request2.completed) { return; } - errorRequest(client, request2, err || new RequestAbortedError()); + errorRequest2(client, request2, err || new RequestAbortedError()); }); } catch (err) { - errorRequest(client, request2, err); + errorRequest2(client, request2, err); } if (request2.aborted) { return false; @@ -8453,7 +8466,7 @@ upgrade: ${upgrade}\r } if (shouldSendContentLength(method) && contentLength > 0 && request2.contentLength != null && request2.contentLength !== contentLength) { if (client[kStrictContentLength]) { - errorRequest(client, request2, new RequestContentLengthMismatchError()); + errorRequest2(client, request2, new RequestContentLengthMismatchError()); return false; } process.emitWarning(new RequestContentLengthMismatchError()); @@ -8485,8 +8498,8 @@ upgrade: ${upgrade}\r stream.once("end", () => { request2.onComplete([]); }); - stream.on("data", (chunk) => { - if (request2.onData(chunk) === false) { + stream.on("data", (chunk2) => { + if (request2.onData(chunk2) === false) { stream.pause(); } }); @@ -8504,7 +8517,7 @@ upgrade: ${upgrade}\r }); stream.once("frameError", (type, code) => { const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`); - errorRequest(client, request2, err); + errorRequest2(client, request2, err); if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { h2State.streams -= 1; util.destroy(stream, err); @@ -8576,8 +8589,8 @@ upgrade: ${upgrade}\r function writeStream({ h2stream, body, client, request: request2, socket, contentLength, header, expectsPayload }) { assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined"); if (client[kHTTPConnVersion] === "h2") { - let onPipeData = function(chunk) { - request2.onBodySent(chunk); + let onPipeData = function(chunk2) { + request2.onBodySent(chunk2); }; const pipe = pipeline( body, @@ -8600,12 +8613,12 @@ upgrade: ${upgrade}\r } let finished = false; const writer = new AsyncWriter({ socket, request: request2, contentLength, client, expectsPayload, header }); - const onData = function(chunk) { + const onData = function(chunk2) { if (finished) { return; } try { - if (!writer.write(chunk) && this.pause) { + if (!writer.write(chunk2) && this.pause) { this.pause(); } } catch (err) { @@ -8706,12 +8719,12 @@ upgrade: ${upgrade}\r if (client[kHTTPConnVersion] === "h2") { h2stream.on("close", onDrain).on("drain", onDrain); try { - for await (const chunk of body) { + for await (const chunk2 of body) { if (socket[kError]) { throw socket[kError]; } - const res = h2stream.write(chunk); - request2.onBodySent(chunk); + const res = h2stream.write(chunk2); + request2.onBodySent(chunk2); if (!res) { await waitForDrain(); } @@ -8728,11 +8741,11 @@ upgrade: ${upgrade}\r socket.on("close", onDrain).on("drain", onDrain); const writer = new AsyncWriter({ socket, request: request2, contentLength, client, expectsPayload, header }); try { - for await (const chunk of body) { + for await (const chunk2 of body) { if (socket[kError]) { throw socket[kError]; } - if (!writer.write(chunk)) { + if (!writer.write(chunk2)) { await waitForDrain(); } } @@ -8754,7 +8767,7 @@ upgrade: ${upgrade}\r this.header = header; socket[kWriting] = true; } - write(chunk) { + write(chunk2) { const { socket, request: request2, contentLength, client, bytesWritten, expectsPayload, header } = this; if (socket[kError]) { throw socket[kError]; @@ -8762,7 +8775,7 @@ upgrade: ${upgrade}\r if (socket.destroyed) { return false; } - const len = Buffer.byteLength(chunk); + const len = Buffer.byteLength(chunk2); if (!len) { return true; } @@ -8792,9 +8805,9 @@ ${len.toString(16)}\r `, "latin1"); } this.bytesWritten += len; - const ret = socket.write(chunk); + const ret = socket.write(chunk2); socket.uncork(); - request2.onBodySent(chunk); + request2.onBodySent(chunk2); if (!ret) { if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { if (socket[kParser].timeout.refresh) { @@ -8849,7 +8862,7 @@ ${len.toString(16)}\r } } }; - function errorRequest(client, request2, err) { + function errorRequest2(client, request2, err) { try { request2.onError(err); assert(request2.aborted); @@ -9497,7 +9510,7 @@ var require_readable = __commonJS({ var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); - var noop2 = () => { + var noop3 = () => { }; module2.exports = class BodyReadable extends Readable { constructor({ @@ -9558,12 +9571,12 @@ var require_readable = __commonJS({ removeListener(ev, ...args) { return this.off(ev, ...args); } - push(chunk) { - if (this[kConsume] && chunk !== null && this.readableLength === 0) { - consumePush(this[kConsume], chunk); - return this[kReading] ? super.push(chunk) : true; + push(chunk2) { + if (this[kConsume] && chunk2 !== null && this.readableLength === 0) { + consumePush(this[kConsume], chunk2); + return this[kReading] ? super.push(chunk2) : true; } - return super.push(chunk); + return super.push(chunk2); } // https://fetch.spec.whatwg.org/#dom-body-text async text() { @@ -9619,7 +9632,7 @@ var require_readable = __commonJS({ return new Promise((resolve, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); - }) : noop2; + }) : noop3; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9627,8 +9640,8 @@ var require_readable = __commonJS({ } else { resolve(null); } - }).on("error", noop2).on("data", function(chunk) { - limit -= chunk.length; + }).on("error", noop3).on("data", function(chunk2) { + limit -= chunk2.length; if (limit <= 0) { this.destroy(); } @@ -9636,11 +9649,11 @@ var require_readable = __commonJS({ }); } }; - function isLocked(self) { - return self[kBody] && self[kBody].locked === true || self[kConsume]; + function isLocked(self2) { + return self2[kBody] && self2[kBody].locked === true || self2[kConsume]; } - function isUnusable(self) { - return util.isDisturbed(self) || isLocked(self); + function isUnusable(self2) { + return util.isDisturbed(self2) || isLocked(self2); } async function consume(stream, type) { if (isUnusable(stream)) { @@ -9671,8 +9684,8 @@ var require_readable = __commonJS({ return; } const { _readableState: state } = consume2.stream; - for (const chunk of state.buffer) { - consumePush(consume2, chunk); + for (const chunk2 of state.buffer) { + consumePush(consume2, chunk2); } if (state.endEmitted) { consumeEnd(this[kConsume]); @@ -9711,9 +9724,9 @@ var require_readable = __commonJS({ stream.destroy(err); } } - function consumePush(consume2, chunk) { - consume2.length += chunk.length; - consume2.body.push(chunk); + function consumePush(consume2, chunk2) { + consume2.length += chunk2.length; + consume2.body.push(chunk2); } function consumeFinish(consume2, err) { if (consume2.body === null) { @@ -9746,9 +9759,9 @@ var require_util3 = __commonJS({ assert(body); let chunks = []; let limit = 0; - for await (const chunk of body) { - chunks.push(chunk); - limit += chunk.length; + for await (const chunk2 of body) { + chunks.push(chunk2); + limit += chunk2.length; if (limit > 128 * 1024) { chunks = null; break; @@ -9784,40 +9797,40 @@ var require_abort_signal = __commonJS({ var { RequestAbortedError } = require_errors(); var kListener = Symbol("kListener"); var kSignal = Symbol("kSignal"); - function abort(self) { - if (self.abort) { - self.abort(); + function abort(self2) { + if (self2.abort) { + self2.abort(); } else { - self.onError(new RequestAbortedError()); + self2.onError(new RequestAbortedError()); } } - function addSignal(self, signal) { - self[kSignal] = null; - self[kListener] = null; + function addSignal(self2, signal) { + self2[kSignal] = null; + self2[kListener] = null; if (!signal) { return; } if (signal.aborted) { - abort(self); + abort(self2); return; } - self[kSignal] = signal; - self[kListener] = () => { - abort(self); + self2[kSignal] = signal; + self2[kListener] = () => { + abort(self2); }; - addAbortListener(self[kSignal], self[kListener]); + addAbortListener(self2[kSignal], self2[kListener]); } - function removeSignal(self) { - if (!self[kSignal]) { + function removeSignal(self2) { + if (!self2[kSignal]) { return; } - if ("removeEventListener" in self[kSignal]) { - self[kSignal].removeEventListener("abort", self[kListener]); + if ("removeEventListener" in self2[kSignal]) { + self2[kSignal].removeEventListener("abort", self2[kListener]); } else { - self[kSignal].removeListener("abort", self[kListener]); + self2[kSignal].removeListener("abort", self2[kListener]); } - self[kSignal] = null; - self[kListener] = null; + self2[kSignal] = null; + self2[kListener] = null; } module2.exports = { addSignal, @@ -9926,9 +9939,9 @@ var require_api_request = __commonJS({ } } } - onData(chunk) { + onData(chunk2) { const { res } = this; - return res.push(chunk); + return res.push(chunk2); } onComplete(trailers) { const { res } = this; @@ -10100,9 +10113,9 @@ var require_api_stream = __commonJS({ const needDrain = res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState && res._writableState.needDrain; return needDrain !== true; } - onData(chunk) { + onData(chunk2) { const { res } = this; - return res ? res.write(chunk) : true; + return res ? res.write(chunk2) : true; } onComplete(trailers) { const { res } = this; @@ -10240,9 +10253,9 @@ var require_api_pipeline = __commonJS({ body.resume(); } }, - write: (chunk, encoding, callback) => { + write: (chunk2, encoding, callback) => { const { req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) { + if (req.push(chunk2, encoding) || req._readableState.destroyed) { callback(); } else { req[kResume] = callback; @@ -10306,9 +10319,9 @@ var require_api_pipeline = __commonJS({ if (!body || typeof body.on !== "function") { throw new InvalidReturnValueError("expected Readable"); } - body.on("data", (chunk) => { + body.on("data", (chunk2) => { const { ret, body: body2 } = this; - if (!ret.push(chunk) && body2.pause) { + if (!ret.push(chunk2) && body2.pause) { body2.pause(); } }).on("error", (err) => { @@ -10325,9 +10338,9 @@ var require_api_pipeline = __commonJS({ }); this.body = body; } - onData(chunk) { + onData(chunk2) { const { res } = this; - return res.push(chunk); + return res.push(chunk2); } onComplete(trailers) { const { res } = this; @@ -11176,8 +11189,8 @@ var require_pending_interceptors_formatter = __commonJS({ module2.exports = class PendingInterceptorsFormatter { constructor({ disableColors } = {}) { this.transform = new Transform({ - transform(chunk, _enc, cb) { - cb(null, chunk); + transform(chunk2, _enc, cb) { + cb(null, chunk2); } }); this.logger = new Console({ @@ -11586,8 +11599,8 @@ var require_RetryHandler = __commonJS({ this.abort = abort; } } - onBodySent(chunk) { - if (this.handler.onBodySent) return this.handler.onBodySent(chunk); + onBodySent(chunk2) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk2); } static [kRetryHandlerDefaultRetry](err, { state, opts }, cb) { const { statusCode, code, headers } = err; @@ -11719,9 +11732,9 @@ var require_RetryHandler = __commonJS({ this.abort(err); return false; } - onData(chunk) { - this.start += chunk.length; - return this.handler.onData(chunk); + onData(chunk2) { + this.start += chunk2.length; + return this.handler.onData(chunk2); } onComplete(rawTrailers) { this.retryCount = 0; @@ -12245,7 +12258,7 @@ var require_response = __commonJS({ var assert = require("assert"); var { types } = require("util"); var ReadableStream = globalThis.ReadableStream || require("stream/web").ReadableStream; - var textEncoder = new TextEncoder("utf-8"); + var textEncoder2 = new TextEncoder("utf-8"); var Response = class _Response { // Creates network error Response. static error() { @@ -12264,7 +12277,7 @@ var require_response = __commonJS({ if (init !== null) { init = webidl.converters.ResponseInit(init); } - const bytes = textEncoder.encode( + const bytes = textEncoder2.encode( serializeJavascriptValueToJSONString(data) ); const body = extractBody(bytes); @@ -12673,15 +12686,15 @@ var require_request2 = __commonJS({ signal = input[kSignal]; } const origin = this[kRealm].settingsObject.origin; - let window = "client"; + let window2 = "client"; if (request2.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request2.window, origin)) { - window = request2.window; + window2 = request2.window; } if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`); + throw new TypeError(`'window' option '${window2}' must be null`); } if ("window" in init) { - window = "no-window"; + window2 = "no-window"; } request2 = makeRequest({ // URL request’s URL. @@ -12696,7 +12709,7 @@ var require_request2 = __commonJS({ // client This’s relevant settings object. client: this[kRealm].settingsObject, // window window. - window, + window: window2, // priority request’s priority. priority: request2.priority, // origin request’s origin. The propagation of the origin is only significant for navigation requests @@ -13707,8 +13720,8 @@ var require_fetch = __commonJS({ if (response.body == null) { processResponseEndOfBody(); } else { - const identityTransformAlgorithm = (chunk, controller) => { - controller.enqueue(chunk); + const identityTransformAlgorithm = (chunk2, controller) => { + controller.enqueue(chunk2); }; const transformStream = new TransformStream({ start() { @@ -14214,11 +14227,11 @@ var require_fetch = __commonJS({ }); return true; }, - onData(chunk) { + onData(chunk2) { if (fetchParams.controller.dump) { return; } - const bytes = chunk; + const bytes = chunk2; timingInfo.encodedBodySize += bytes.byteLength; return this.body.push(bytes); }, @@ -14745,8 +14758,8 @@ var require_util4 = __commonJS({ } dataURL += ";base64,"; const decoder = new StringDecoder("latin1"); - for (const chunk of bytes) { - dataURL += btoa(decoder.write(chunk)); + for (const chunk2 of bytes) { + dataURL += btoa(decoder.write(chunk2)); } dataURL += btoa(decoder.end()); return dataURL; @@ -14774,8 +14787,8 @@ var require_util4 = __commonJS({ case "BinaryString": { let binaryString = ""; const decoder = new StringDecoder("latin1"); - for (const chunk of bytes) { - binaryString += decoder.write(chunk); + for (const chunk2 of bytes) { + binaryString += decoder.write(chunk2); } binaryString += decoder.end(); return binaryString; @@ -16122,8 +16135,8 @@ var require_cookies = __commonJS({ webidl.argumentLengthCheck(arguments, 2, { header: "setCookie" }); webidl.brandCheck(headers, Headers, { strict: false }); cookie = webidl.converters.Cookie(cookie); - const str = stringify2(cookie); - if (str) { + const str2 = stringify2(cookie); + if (str2) { headers.append("Set-Cookie", stringify2(cookie)); } } @@ -16700,8 +16713,8 @@ var require_connection = __commonJS({ }); return controller; } - function onSocketData(chunk) { - if (!this.ws[kByteParser].write(chunk)) { + function onSocketData(chunk2) { + if (!this.ws[kByteParser].write(chunk2)) { this.pause(); } } @@ -16829,9 +16842,9 @@ var require_receiver = __commonJS({ * @param {Buffer} chunk * @param {() => void} callback */ - _write(chunk, _, callback) { - this.#buffers.push(chunk); - this.#byteOffset += chunk.length; + _write(chunk2, _, callback) { + this.#buffers.push(chunk2); + this.#byteOffset += chunk2.length; this.run(callback); } /** @@ -17723,8 +17736,8 @@ var require_lib = __commonJS({ return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); + this.message.on("data", (chunk2) => { + output = Buffer.concat([output, chunk2]); }); this.message.on("end", () => { resolve(output.toString()); @@ -17736,8 +17749,8 @@ var require_lib = __commonJS({ return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); + this.message.on("data", (chunk2) => { + chunks.push(chunk2); }); this.message.on("end", () => { resolve(Buffer.concat(chunks)); @@ -19120,9 +19133,9 @@ var require_utils3 = __commonJS({ } }); -// npm/node_modules/universal-user-agent/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/universal-user-agent/dist-node/index.js var require_dist_node = __commonJS({ - "npm/node_modules/universal-user-agent/dist-node/index.js"(exports2) { + "npm/node_modules/@actions/github/node_modules/universal-user-agent/dist-node/index.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); function getUserAgent2() { @@ -19138,9 +19151,9 @@ var require_dist_node = __commonJS({ } }); -// npm/node_modules/before-after-hook/lib/register.js +// npm/node_modules/@actions/github/node_modules/before-after-hook/lib/register.js var require_register = __commonJS({ - "npm/node_modules/before-after-hook/lib/register.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/before-after-hook/lib/register.js"(exports2, module2) { module2.exports = register2; function register2(state, name, method, options) { if (typeof method !== "function") { @@ -19166,9 +19179,9 @@ var require_register = __commonJS({ } }); -// npm/node_modules/before-after-hook/lib/add.js +// npm/node_modules/@actions/github/node_modules/before-after-hook/lib/add.js var require_add = __commonJS({ - "npm/node_modules/before-after-hook/lib/add.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/before-after-hook/lib/add.js"(exports2, module2) { module2.exports = addHook2; function addHook2(state, kind, name, hook2) { var orig = hook2; @@ -19206,9 +19219,9 @@ var require_add = __commonJS({ } }); -// npm/node_modules/before-after-hook/lib/remove.js +// npm/node_modules/@actions/github/node_modules/before-after-hook/lib/remove.js var require_remove = __commonJS({ - "npm/node_modules/before-after-hook/lib/remove.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/before-after-hook/lib/remove.js"(exports2, module2) { module2.exports = removeHook2; function removeHook2(state, name, method) { if (!state.registry[name]) { @@ -19225,9 +19238,9 @@ var require_remove = __commonJS({ } }); -// npm/node_modules/before-after-hook/index.js +// npm/node_modules/@actions/github/node_modules/before-after-hook/index.js var require_before_after_hook = __commonJS({ - "npm/node_modules/before-after-hook/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/before-after-hook/index.js"(exports2, module2) { var register2 = require_register(); var addHook2 = require_add(); var removeHook2 = require_remove(); @@ -19281,9 +19294,9 @@ var require_before_after_hook = __commonJS({ } }); -// npm/node_modules/@octokit/endpoint/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/endpoint/dist-node/index.js var require_dist_node2 = __commonJS({ - "npm/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/endpoint/dist-node/index.js"(exports2, module2) { "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; @@ -19308,8 +19321,8 @@ var require_dist_node2 = __commonJS({ }); module2.exports = __toCommonJS2(dist_src_exports); var import_universal_user_agent5 = require_dist_node(); - var VERSION9 = "9.0.5"; - var userAgent2 = `octokit-endpoint.js/${VERSION9} ${(0, import_universal_user_agent5.getUserAgent)()}`; + var VERSION11 = "9.0.5"; + var userAgent2 = `octokit-endpoint.js/${VERSION11} ${(0, import_universal_user_agent5.getUserAgent)()}`; var DEFAULTS2 = { method: "GET", baseUrl: "https://api.github.com", @@ -19363,7 +19376,7 @@ var require_dist_node2 = __commonJS({ } return obj; } - function merge2(defaults, route, options) { + function merge3(defaults, route, options) { if (typeof route === "string") { let [method, url] = route.split(" "); options = Object.assign(url ? { method, url } : { url: method }, options); @@ -19417,16 +19430,16 @@ var require_dist_node2 = __commonJS({ } return result; } - function encodeReserved2(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + function encodeReserved2(str2) { + return str2.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { if (!/%[0-9A-Fa-f]/.test(part)) { part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); } return part; }).join(""); } - function encodeUnreserved2(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + function encodeUnreserved2(str2) { + return encodeURIComponent(str2).replace(/[!'()*]/g, function(c) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } @@ -19547,7 +19560,7 @@ var require_dist_node2 = __commonJS({ return template.replace(/\/$/, ""); } } - function parse3(options) { + function parse4(options) { let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); @@ -19611,16 +19624,16 @@ var require_dist_node2 = __commonJS({ ); } function endpointWithDefaults2(defaults, route, options) { - return parse3(merge2(defaults, route, options)); + return parse4(merge3(defaults, route, options)); } function withDefaults4(oldDefaults, newDefaults) { - const DEFAULTS22 = merge2(oldDefaults, newDefaults); + const DEFAULTS22 = merge3(oldDefaults, newDefaults); const endpoint22 = endpointWithDefaults2.bind(null, DEFAULTS22); return Object.assign(endpoint22, { DEFAULTS: DEFAULTS22, defaults: withDefaults4.bind(null, DEFAULTS22), - merge: merge2.bind(null, DEFAULTS22), - parse: parse3 + merge: merge3.bind(null, DEFAULTS22), + parse: parse4 }); } var endpoint2 = withDefaults4(null, DEFAULTS2); @@ -19719,9 +19732,9 @@ var require_once = __commonJS({ } }); -// npm/node_modules/@octokit/request-error/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/request-error/dist-node/index.js var require_dist_node4 = __commonJS({ - "npm/node_modules/@octokit/request-error/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/request-error/dist-node/index.js"(exports2, module2) { "use strict"; var __create2 = Object.create; var __defProp2 = Object.defineProperty; @@ -19811,9 +19824,9 @@ var require_dist_node4 = __commonJS({ } }); -// npm/node_modules/@octokit/request/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js var require_dist_node5 = __commonJS({ - "npm/node_modules/@octokit/request/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/request/dist-node/index.js"(exports2, module2) { "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; @@ -19839,7 +19852,7 @@ var require_dist_node5 = __commonJS({ module2.exports = __toCommonJS2(dist_src_exports); var import_endpoint2 = require_dist_node2(); var import_universal_user_agent5 = require_dist_node(); - var VERSION9 = "8.4.0"; + var VERSION11 = "8.4.0"; function isPlainObject3(value) { if (typeof value !== "object" || value === null) return false; @@ -19851,7 +19864,7 @@ var require_dist_node5 = __commonJS({ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); } - var import_request_error2 = require_dist_node4(); + var import_request_error3 = require_dist_node4(); function getBufferResponse(response) { return response.arrayBuffer(); } @@ -19903,7 +19916,7 @@ var require_dist_node5 = __commonJS({ if (status < 400) { return; } - throw new import_request_error2.RequestError(response.statusText, status, { + throw new import_request_error3.RequestError(response.statusText, status, { response: { url, status, @@ -19914,7 +19927,7 @@ var require_dist_node5 = __commonJS({ }); } if (status === 304) { - throw new import_request_error2.RequestError("Not modified", status, { + throw new import_request_error3.RequestError("Not modified", status, { response: { url, status, @@ -19926,7 +19939,7 @@ var require_dist_node5 = __commonJS({ } if (status >= 400) { const data = await getResponseData2(response); - const error = new import_request_error2.RequestError(toErrorMessage2(data), status, { + const error = new import_request_error3.RequestError(toErrorMessage2(data), status, { response: { url, status, @@ -19946,7 +19959,7 @@ var require_dist_node5 = __commonJS({ data }; }).catch((error) => { - if (error instanceof import_request_error2.RequestError) + if (error instanceof import_request_error3.RequestError) throw error; else if (error.name === "AbortError") throw error; @@ -19958,7 +19971,7 @@ var require_dist_node5 = __commonJS({ message2 = error.cause; } } - throw new import_request_error2.RequestError(message2, 500, { + throw new import_request_error3.RequestError(message2, 500, { request: requestOptions }); }); @@ -20015,15 +20028,15 @@ var require_dist_node5 = __commonJS({ } var request2 = withDefaults4(import_endpoint2.endpoint, { headers: { - "user-agent": `octokit-request.js/${VERSION9} ${(0, import_universal_user_agent5.getUserAgent)()}` + "user-agent": `octokit-request.js/${VERSION11} ${(0, import_universal_user_agent5.getUserAgent)()}` } }); } }); -// npm/node_modules/@octokit/graphql/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js var require_dist_node6 = __commonJS({ - "npm/node_modules/@octokit/graphql/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/graphql/dist-node/index.js"(exports2, module2) { "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; @@ -20051,7 +20064,7 @@ var require_dist_node6 = __commonJS({ module2.exports = __toCommonJS2(dist_src_exports); var import_request3 = require_dist_node5(); var import_universal_user_agent5 = require_dist_node(); - var VERSION9 = "7.1.0"; + var VERSION11 = "7.1.0"; var import_request22 = require_dist_node5(); var import_request4 = require_dist_node5(); function _buildMessageForResponseErrors2(data) { @@ -20145,7 +20158,7 @@ var require_dist_node6 = __commonJS({ } var graphql22 = withDefaults4(import_request3.request, { headers: { - "user-agent": `octokit-graphql.js/${VERSION9} ${(0, import_universal_user_agent5.getUserAgent)()}` + "user-agent": `octokit-graphql.js/${VERSION11} ${(0, import_universal_user_agent5.getUserAgent)()}` }, method: "POST", url: "/graphql" @@ -20159,9 +20172,9 @@ var require_dist_node6 = __commonJS({ } }); -// npm/node_modules/@octokit/auth-token/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/auth-token/dist-node/index.js var require_dist_node7 = __commonJS({ - "npm/node_modules/@octokit/auth-token/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/auth-token/dist-node/index.js"(exports2, module2) { "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; @@ -20230,9 +20243,9 @@ var require_dist_node7 = __commonJS({ } }); -// npm/node_modules/@octokit/core/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js var require_dist_node8 = __commonJS({ - "npm/node_modules/@octokit/core/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/core/dist-node/index.js"(exports2, module2) { "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; @@ -20261,15 +20274,15 @@ var require_dist_node8 = __commonJS({ var import_request3 = require_dist_node5(); var import_graphql2 = require_dist_node6(); var import_auth_token2 = require_dist_node7(); - var VERSION9 = "5.2.0"; - var noop2 = () => { + var VERSION11 = "5.2.0"; + var noop3 = () => { }; var consoleWarn2 = console.warn.bind(console); var consoleError2 = console.error.bind(console); - var userAgentTrail2 = `octokit-core.js/${VERSION9} ${(0, import_universal_user_agent5.getUserAgent)()}`; + var userAgentTrail2 = `octokit-core.js/${VERSION11} ${(0, import_universal_user_agent5.getUserAgent)()}`; var Octokit3 = class { static { - this.VERSION = VERSION9; + this.VERSION = VERSION11; } static defaults(defaults) { const OctokitWithDefaults = class extends this { @@ -20341,8 +20354,8 @@ var require_dist_node8 = __commonJS({ this.graphql = (0, import_graphql2.withCustomRequest)(this.request).defaults(requestDefaults); this.log = Object.assign( { - debug: noop2, - info: noop2, + debug: noop3, + info: noop3, warn: consoleWarn2, error: consoleError2 }, @@ -20389,9 +20402,9 @@ var require_dist_node8 = __commonJS({ } }); -// npm/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js var require_dist_node9 = __commonJS({ - "npm/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js"(exports2, module2) { "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; @@ -20416,7 +20429,7 @@ var require_dist_node9 = __commonJS({ restEndpointMethods: () => restEndpointMethods2 }); module2.exports = __toCommonJS2(dist_src_exports); - var VERSION9 = "10.4.1"; + var VERSION11 = "10.4.1"; var Endpoints2 = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -22533,7 +22546,7 @@ var require_dist_node9 = __commonJS({ rest: api }; } - restEndpointMethods2.VERSION = VERSION9; + restEndpointMethods2.VERSION = VERSION11; function legacyRestEndpointMethods2(octokit) { const api = endpointsToMethods2(octokit); return { @@ -22541,13 +22554,13 @@ var require_dist_node9 = __commonJS({ rest: api }; } - legacyRestEndpointMethods2.VERSION = VERSION9; + legacyRestEndpointMethods2.VERSION = VERSION11; } }); -// npm/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js +// npm/node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js var require_dist_node10 = __commonJS({ - "npm/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js"(exports2, module2) { + "npm/node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js"(exports2, module2) { "use strict"; var __defProp2 = Object.defineProperty; var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor; @@ -22574,7 +22587,7 @@ var require_dist_node10 = __commonJS({ paginatingEndpoints: () => paginatingEndpoints }); module2.exports = __toCommonJS2(dist_src_exports); - var VERSION9 = "9.2.1"; + var VERSION11 = "9.2.1"; function normalizePaginatedListResponse2(response) { if (!response.data) { return { @@ -22920,7 +22933,7 @@ var require_dist_node10 = __commonJS({ }) }; } - paginateRest2.VERSION = VERSION9; + paginateRest2.VERSION = VERSION11; } }); @@ -23028,741 +23041,10549 @@ var require_github = __commonJS({ } }); -// npm/src/_dnt.polyfills.ts -if (!Object.hasOwn) { - Object.defineProperty(Object, "hasOwn", { - value: function(object, property) { - if (object == null) { - throw new TypeError("Cannot convert undefined or null to object"); +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/errors.js +var require_errors2 = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/errors.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WriteZero = exports2.UnexpectedEof = exports2.TimedOut = exports2.PermissionDenied = exports2.NotFound = exports2.NotConnected = exports2.InvalidData = exports2.Interrupted = exports2.Http = exports2.ConnectionReset = exports2.ConnectionRefused = exports2.ConnectionAborted = exports2.Busy = exports2.BrokenPipe = exports2.BadResource = exports2.AlreadyExists = exports2.AddrNotAvailable = exports2.AddrInUse = void 0; + var AddrInUse = class extends Error { + }; + exports2.AddrInUse = AddrInUse; + var AddrNotAvailable = class extends Error { + }; + exports2.AddrNotAvailable = AddrNotAvailable; + var AlreadyExists = class extends Error { + }; + exports2.AlreadyExists = AlreadyExists; + var BadResource = class extends Error { + }; + exports2.BadResource = BadResource; + var BrokenPipe = class extends Error { + }; + exports2.BrokenPipe = BrokenPipe; + var Busy = class extends Error { + }; + exports2.Busy = Busy; + var ConnectionAborted = class extends Error { + }; + exports2.ConnectionAborted = ConnectionAborted; + var ConnectionRefused = class extends Error { + }; + exports2.ConnectionRefused = ConnectionRefused; + var ConnectionReset = class extends Error { + }; + exports2.ConnectionReset = ConnectionReset; + var Http = class extends Error { + }; + exports2.Http = Http; + var Interrupted = class extends Error { + }; + exports2.Interrupted = Interrupted; + var InvalidData = class extends Error { + }; + exports2.InvalidData = InvalidData; + var NotConnected = class extends Error { + }; + exports2.NotConnected = NotConnected; + var NotFound = class extends Error { + constructor() { + super(...arguments); + this.code = "ENOENT"; } - return Object.prototype.hasOwnProperty.call(Object(object), property); - }, - configurable: true, - enumerable: false, - writable: true - }); -} + }; + exports2.NotFound = NotFound; + var PermissionDenied = class extends Error { + }; + exports2.PermissionDenied = PermissionDenied; + var TimedOut = class extends Error { + }; + exports2.TimedOut = TimedOut; + var UnexpectedEof = class extends Error { + }; + exports2.UnexpectedEof = UnexpectedEof; + var WriteZero = class extends Error { + }; + exports2.WriteZero = WriteZero; + } +}); -// npm/src/post.ts -var import_promises = require("timers/promises"); -var import_process2 = __toESM(require("process")); -var import_core2 = __toESM(require_core()); -var github = __toESM(require_github()); +// npm/node_modules/@deno/shim-deno/dist/deno/internal/errorMap.js +var require_errorMap = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/errorMap.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + var errors = __importStar(require_errors2()); + var mapper = (Ctor) => (err) => Object.assign(new Ctor(err.message), { + stack: err.stack + }); + var map2 = { + EEXIST: mapper(errors.AlreadyExists), + ENOENT: mapper(errors.NotFound), + EBADF: mapper(errors.BadResource) + }; + var isNodeErr = (e) => { + return e instanceof Error && "code" in e; + }; + function mapError(e) { + var _a; + if (!isNodeErr(e)) + return e; + return ((_a = map2[e.code]) === null || _a === void 0 ? void 0 : _a.call(map2, e)) || e; + } + exports2.default = mapError; + } +}); -// npm/src/deps/deno.land/std@0.224.0/collections/deep_merge.ts -var { hasOwn } = Object; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/stat.js +var require_stat = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/stat.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stat = exports2.denoifyFileInfo = void 0; + var promises_1 = require("node:fs/promises"); + var os = __importStar(require("node:os")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var isWindows = os.platform() === "win32"; + function denoifyFileInfo(s) { + return { + atime: s.atime, + birthtime: s.birthtime, + blksize: isWindows ? null : s.blksize, + blocks: isWindows ? null : s.blocks, + dev: s.dev, + gid: isWindows ? null : s.gid, + ino: isWindows ? null : s.ino, + isDirectory: s.isDirectory(), + isFile: s.isFile(), + isSymlink: s.isSymbolicLink(), + isBlockDevice: isWindows ? null : s.isBlockDevice(), + isCharDevice: isWindows ? null : s.isCharacterDevice(), + isFifo: isWindows ? null : s.isFIFO(), + isSocket: isWindows ? null : s.isSocket(), + mode: isWindows ? null : s.mode, + mtime: s.mtime, + nlink: isWindows ? null : s.nlink, + rdev: isWindows ? null : s.rdev, + size: s.size, + uid: isWindows ? null : s.uid + }; + } + exports2.denoifyFileInfo = denoifyFileInfo; + var stat = async (path) => { + try { + return denoifyFileInfo(await (0, promises_1.stat)(path)); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.stat = stat; + } +}); -// npm/src/deps/deno.land/std@0.224.0/collections/sum_of.ts -function sumOf(array, selector) { - let sum = 0; - for (const i of array) { - sum += selector(i); +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstat.js +var require_fstat = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstat.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fstat = void 0; + var fs = __importStar(require("fs")); + var util_1 = require("util"); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var nodeFstat = (0, util_1.promisify)(fs.fstat); + var fstat = async function(fd) { + try { + return (0, stat_js_1.denoifyFileInfo)(await nodeFstat(fd)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.fstat = fstat; } - return sum; -} +}); -// npm/node_modules/date-fns/toDate.mjs -function toDate(argument) { - const argStr = Object.prototype.toString.call(argument); - if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") { - return new argument.constructor(+argument); - } else if (typeof argument === "number" || argStr === "[object Number]" || typeof argument === "string" || argStr === "[object String]") { - return new Date(argument); - } else { - return /* @__PURE__ */ new Date(NaN); +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstatSync.js +var require_fstatSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fstatSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fstatSync = void 0; + var fs_1 = require("fs"); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var fstatSync = function fstatSync2(fd) { + try { + return (0, stat_js_1.denoifyFileInfo)((0, fs_1.fstatSync)(fd)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.fstatSync = fstatSync; } -} +}); -// npm/node_modules/date-fns/constructFrom.mjs -function constructFrom(date, value) { - if (date instanceof Date) { - return new date.constructor(value); - } else { - return new Date(value); +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncate.js +var require_ftruncate = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncate.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ftruncate = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var _ftruncate = (0, util_1.promisify)(fs_1.ftruncate); + exports2.ftruncate = _ftruncate; } -} +}); -// npm/node_modules/date-fns/constants.mjs -var daysInYear = 365.2425; -var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3; -var minTime = -maxTime; -var millisecondsInWeek = 6048e5; -var millisecondsInDay = 864e5; -var secondsInHour = 3600; -var secondsInDay = secondsInHour * 24; -var secondsInWeek = secondsInDay * 7; -var secondsInYear = secondsInDay * daysInYear; -var secondsInMonth = secondsInYear / 12; -var secondsInQuarter = secondsInMonth * 3; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncateSync.js +var require_ftruncateSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/ftruncateSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ftruncateSync = void 0; + var fs_1 = require("fs"); + exports2.ftruncateSync = fs_1.ftruncateSync; + } +}); -// npm/node_modules/date-fns/_lib/defaultOptions.mjs -var defaultOptions = {}; -function getDefaultOptions() { - return defaultOptions; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasync.js +var require_fdatasync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fdatasync = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var _fdatasync = (0, util_1.promisify)(fs_1.fdatasync); + exports2.fdatasync = _fdatasync; + } +}); -// npm/node_modules/date-fns/startOfWeek.mjs -function startOfWeek(date, options) { - const defaultOptions2 = getDefaultOptions(); - const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0; - const _date = toDate(date); - const day = _date.getDay(); - const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; - _date.setDate(_date.getDate() - diff); - _date.setHours(0, 0, 0, 0); - return _date; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasyncSync.js +var require_fdatasyncSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fdatasyncSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fdatasyncSync = void 0; + var fs_1 = require("fs"); + exports2.fdatasyncSync = fs_1.fdatasyncSync; + } +}); -// npm/node_modules/date-fns/startOfISOWeek.mjs -function startOfISOWeek(date) { - return startOfWeek(date, { weekStartsOn: 1 }); -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/read.js +var require_read = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/read.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = void 0; + var util_1 = require("util"); + var fs_1 = require("fs"); + var _read = (0, util_1.promisify)(fs_1.read); + var read = async function read2(rid, buffer) { + if (buffer == null) { + throw new TypeError("Buffer must not be null."); + } + if (buffer.length === 0) { + return 0; + } + const { bytesRead } = await _read(rid, buffer, 0, buffer.length, null); + return bytesRead === 0 ? null : bytesRead; + }; + exports2.read = read; + } +}); -// npm/node_modules/date-fns/getISOWeekYear.mjs -function getISOWeekYear(date) { - const _date = toDate(date); - const year = _date.getFullYear(); - const fourthOfJanuaryOfNextYear = constructFrom(date, 0); - fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); - fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); - const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear); - const fourthOfJanuaryOfThisYear = constructFrom(date, 0); - fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); - fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); - const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear); - if (_date.getTime() >= startOfNextYear.getTime()) { - return year + 1; - } else if (_date.getTime() >= startOfThisYear.getTime()) { - return year; - } else { - return year - 1; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readSync.js +var require_readSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readSync = void 0; + var fs = __importStar(require("fs")); + var readSync = (fd, buffer) => { + const bytesRead = fs.readSync(fd, buffer); + return bytesRead === 0 ? null : bytesRead; + }; + exports2.readSync = readSync; } -} - -// npm/node_modules/date-fns/startOfDay.mjs -function startOfDay(date) { - const _date = toDate(date); - _date.setHours(0, 0, 0, 0); - return _date; -} +}); -// npm/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs -function getTimezoneOffsetInMilliseconds(date) { - const _date = toDate(date); - const utcDate = new Date( - Date.UTC( - _date.getFullYear(), - _date.getMonth(), - _date.getDate(), - _date.getHours(), - _date.getMinutes(), - _date.getSeconds(), - _date.getMilliseconds() - ) - ); - utcDate.setUTCFullYear(_date.getFullYear()); - return +date - +utcDate; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/write.js +var require_write = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/write.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.write = void 0; + var fs = __importStar(require("fs")); + var util_1 = require("util"); + var nodeWrite = (0, util_1.promisify)(fs.write); + var write = async (fd, data) => { + const { bytesWritten } = await nodeWrite(fd, data); + return bytesWritten; + }; + exports2.write = write; + } +}); -// npm/node_modules/date-fns/differenceInCalendarDays.mjs -function differenceInCalendarDays(dateLeft, dateRight) { - const startOfDayLeft = startOfDay(dateLeft); - const startOfDayRight = startOfDay(dateRight); - const timestampLeft = +startOfDayLeft - getTimezoneOffsetInMilliseconds(startOfDayLeft); - const timestampRight = +startOfDayRight - getTimezoneOffsetInMilliseconds(startOfDayRight); - return Math.round((timestampLeft - timestampRight) / millisecondsInDay); -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeSync.js +var require_writeSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeSync = void 0; + var fs = __importStar(require("fs")); + exports2.writeSync = fs.writeSync; + } +}); -// npm/node_modules/date-fns/startOfISOWeekYear.mjs -function startOfISOWeekYear(date) { - const year = getISOWeekYear(date); - const fourthOfJanuary = constructFrom(date, 0); - fourthOfJanuary.setFullYear(year, 0, 4); - fourthOfJanuary.setHours(0, 0, 0, 0); - return startOfISOWeek(fourthOfJanuary); -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/FsFile.js +var require_FsFile = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/FsFile.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; + }; + var _a; + var _b; + var _c; + var _d; + var _FsFile_closed; + var _FsFile_readableStream; + var _FsFile_writableStream; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.File = exports2.FsFile = void 0; + var fs = __importStar(require("node:fs")); + var stream = __importStar(require("node:stream")); + var fstat_js_1 = require_fstat(); + var fstatSync_js_1 = require_fstatSync(); + var ftruncate_js_1 = require_ftruncate(); + var ftruncateSync_js_1 = require_ftruncateSync(); + var fdatasync_js_1 = require_fdatasync(); + var fdatasyncSync_js_1 = require_fdatasyncSync(); + var read_js_1 = require_read(); + var readSync_js_1 = require_readSync(); + var write_js_1 = require_write(); + var writeSync_js_1 = require_writeSync(); + (_a = (_c = Symbol).dispose) !== null && _a !== void 0 ? _a : _c.dispose = Symbol("Symbol.dispose"); + (_b = (_d = Symbol).asyncDispose) !== null && _b !== void 0 ? _b : _d.asyncDispose = Symbol("Symbol.asyncDispose"); + var FsFile = class { + constructor(rid) { + this.rid = rid; + _FsFile_closed.set(this, false); + _FsFile_readableStream.set(this, void 0); + _FsFile_writableStream.set(this, void 0); + } + [(_FsFile_closed = /* @__PURE__ */ new WeakMap(), _FsFile_readableStream = /* @__PURE__ */ new WeakMap(), _FsFile_writableStream = /* @__PURE__ */ new WeakMap(), Symbol.dispose)]() { + if (!__classPrivateFieldGet(this, _FsFile_closed, "f")) { + this.close(); + } + } + async write(p) { + return await (0, write_js_1.write)(this.rid, p); + } + writeSync(p) { + return (0, writeSync_js_1.writeSync)(this.rid, p); + } + async truncate(len) { + await (0, ftruncate_js_1.ftruncate)(this.rid, len); + } + truncateSync(len) { + return (0, ftruncateSync_js_1.ftruncateSync)(this.rid, len); + } + read(p) { + return (0, read_js_1.read)(this.rid, p); + } + readSync(p) { + return (0, readSync_js_1.readSync)(this.rid, p); + } + seek(_offset, _whence) { + throw new Error("Method not implemented."); + } + seekSync(_offset, _whence) { + throw new Error("Method not implemented."); + } + async stat() { + return await (0, fstat_js_1.fstat)(this.rid); + } + statSync() { + return (0, fstatSync_js_1.fstatSync)(this.rid); + } + sync() { + throw new Error("Method not implemented."); + } + syncSync() { + throw new Error("Method not implemented."); + } + syncData() { + return (0, fdatasync_js_1.fdatasync)(this.rid); + } + syncDataSync() { + return (0, fdatasyncSync_js_1.fdatasyncSync)(this.rid); + } + utime(_atime, _mtime) { + throw new Error("Method not implemented."); + } + utimeSync(_atime, _mtime) { + throw new Error("Method not implemented."); + } + close() { + __classPrivateFieldSet(this, _FsFile_closed, true, "f"); + fs.closeSync(this.rid); + } + get readable() { + if (__classPrivateFieldGet(this, _FsFile_readableStream, "f") == null) { + const nodeStream = fs.createReadStream(null, { + fd: this.rid, + autoClose: false + }); + __classPrivateFieldSet(this, _FsFile_readableStream, stream.Readable.toWeb(nodeStream), "f"); + } + return __classPrivateFieldGet(this, _FsFile_readableStream, "f"); + } + get writable() { + if (__classPrivateFieldGet(this, _FsFile_writableStream, "f") == null) { + const nodeStream = fs.createWriteStream(null, { + fd: this.rid, + autoClose: false + }); + __classPrivateFieldSet(this, _FsFile_writableStream, stream.Writable.toWeb(nodeStream), "f"); + } + return __classPrivateFieldGet(this, _FsFile_writableStream, "f"); + } + }; + exports2.FsFile = FsFile; + var File = FsFile; + exports2.File = File; + } +}); -// npm/node_modules/date-fns/isDate.mjs -function isDate(value) { - return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]"; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js +var require_PermissionStatus = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/PermissionStatus.js"(exports2) { + "use strict"; + var _a; + var _b; + var _c; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PermissionStatus = void 0; + (_a = (_c = globalThis).EventTarget) !== null && _a !== void 0 ? _a : _c.EventTarget = (_b = require("events").EventTarget) !== null && _b !== void 0 ? _b : null; + var PermissionStatus = class extends EventTarget { + /** @internal */ + constructor(state) { + super(); + this.state = state; + this.onchange = null; + this.partial = false; + } + }; + exports2.PermissionStatus = PermissionStatus; + } +}); -// npm/node_modules/date-fns/isValid.mjs -function isValid(date) { - if (!isDate(date) && typeof date !== "number") { - return false; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js +var require_Permissions = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/classes/Permissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Permissions = void 0; + var PermissionStatus_js_1 = require_PermissionStatus(); + var Permissions = class { + query(desc) { + return Promise.resolve(this.querySync(desc)); + } + querySync(_desc) { + return new PermissionStatus_js_1.PermissionStatus("granted"); + } + revoke(desc) { + return Promise.resolve(this.revokeSync(desc)); + } + revokeSync(_desc) { + return new PermissionStatus_js_1.PermissionStatus("denied"); + } + request(desc) { + return this.query(desc); + } + requestSync(desc) { + return this.querySync(desc); + } + }; + exports2.Permissions = Permissions; } - const _date = toDate(date); - return !isNaN(Number(_date)); -} +}); -// npm/node_modules/date-fns/startOfYear.mjs -function startOfYear(date) { - const cleanDate = toDate(date); - const _date = constructFrom(date, 0); - _date.setFullYear(cleanDate.getFullYear(), 0, 1); - _date.setHours(0, 0, 0, 0); - return _date; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/classes.js +var require_classes = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/classes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PermissionStatus = exports2.Permissions = exports2.FsFile = exports2.File = void 0; + var FsFile_js_1 = require_FsFile(); + Object.defineProperty(exports2, "File", { enumerable: true, get: function() { + return FsFile_js_1.File; + } }); + Object.defineProperty(exports2, "FsFile", { enumerable: true, get: function() { + return FsFile_js_1.FsFile; + } }); + var Permissions_js_1 = require_Permissions(); + Object.defineProperty(exports2, "Permissions", { enumerable: true, get: function() { + return Permissions_js_1.Permissions; + } }); + var PermissionStatus_js_1 = require_PermissionStatus(); + Object.defineProperty(exports2, "PermissionStatus", { enumerable: true, get: function() { + return PermissionStatus_js_1.PermissionStatus; + } }); + } +}); -// npm/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs -var formatDistanceLocale = { - lessThanXSeconds: { - one: "less than a second", - other: "less than {{count}} seconds" - }, - xSeconds: { - one: "1 second", - other: "{{count}} seconds" - }, - halfAMinute: "half a minute", - lessThanXMinutes: { - one: "less than a minute", - other: "less than {{count}} minutes" - }, - xMinutes: { - one: "1 minute", - other: "{{count}} minutes" - }, - aboutXHours: { - one: "about 1 hour", - other: "about {{count}} hours" - }, - xHours: { - one: "1 hour", - other: "{{count}} hours" - }, - xDays: { - one: "1 day", - other: "{{count}} days" - }, - aboutXWeeks: { - one: "about 1 week", - other: "about {{count}} weeks" - }, - xWeeks: { - one: "1 week", - other: "{{count}} weeks" - }, - aboutXMonths: { - one: "about 1 month", - other: "about {{count}} months" - }, - xMonths: { - one: "1 month", - other: "{{count}} months" - }, - aboutXYears: { - one: "about 1 year", - other: "about {{count}} years" - }, - xYears: { - one: "1 year", - other: "{{count}} years" - }, - overXYears: { - one: "over 1 year", - other: "over {{count}} years" - }, - almostXYears: { - one: "almost 1 year", - other: "almost {{count}} years" +// npm/node_modules/@deno/shim-deno/dist/deno/stable/enums/SeekMode.js +var require_SeekMode = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/enums/SeekMode.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SeekMode = void 0; + var SeekMode; + (function(SeekMode2) { + SeekMode2[SeekMode2["Start"] = 0] = "Start"; + SeekMode2[SeekMode2["Current"] = 1] = "Current"; + SeekMode2[SeekMode2["End"] = 2] = "End"; + })(SeekMode || (exports2.SeekMode = SeekMode = {})); } -}; -var formatDistance = (token, count, options) => { - let result; - const tokenValue = formatDistanceLocale[token]; - if (typeof tokenValue === "string") { - result = tokenValue; - } else if (count === 1) { - result = tokenValue.one; - } else { - result = tokenValue.other.replace("{{count}}", count.toString()); +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/enums.js +var require_enums = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/enums.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SeekMode = void 0; + var SeekMode_js_1 = require_SeekMode(); + Object.defineProperty(exports2, "SeekMode", { enumerable: true, get: function() { + return SeekMode_js_1.SeekMode; + } }); } - if (options?.addSuffix) { - if (options.comparison && options.comparison > 0) { - return "in " + result; - } else { - return result + " ago"; +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/build.js +var require_build = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/build.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.build = void 0; + var os = __importStar(require("os")); + exports2.build = { + arch: "x86_64", + os: /* @__PURE__ */ ((p) => p === "win32" ? "windows" : p === "darwin" ? "darwin" : "linux")(os.platform()), + vendor: "pc", + target: /* @__PURE__ */ ((p) => p === "win32" ? "x86_64-pc-windows-msvc" : p === "darwin" ? "x86_64-apple-darwin" : "x86_64-unknown-linux-gnu")(os.platform()) + }; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/customInspect.js +var require_customInspect = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/customInspect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.customInspect = void 0; + exports2.customInspect = Symbol.for("nodejs.util.inspect.custom"); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/env.js +var require_env = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/env.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.env = void 0; + exports2.env = { + get(key) { + assertValidKey(key); + return process.env[key]; + }, + set(key, value) { + assertValidKey(key); + assertValidValue(value); + process.env[key] = value; + }, + has(key) { + assertValidKey(key); + return key in process.env; + }, + delete(key) { + assertValidKey(key); + delete process.env[key]; + }, + // @ts-expect-error https://github.com/denoland/deno/issues/10267 + toObject() { + return { ...process.env }; + } + }; + var invalidKeyChars = ["=", "\0"].map((c) => c.charCodeAt(0)); + var invalidValueChar = "\0".charCodeAt(0); + function assertValidKey(key) { + if (key.length === 0) { + throw new TypeError("Key is an empty string."); + } + for (let i = 0; i < key.length; i++) { + if (invalidKeyChars.includes(key.charCodeAt(i))) { + const char = key.charCodeAt(i) === "\0".charCodeAt(0) ? "\\0" : key[i]; + throw new TypeError(`Key contains invalid characters: "${char}"`); + } + } + } + function assertValidValue(value) { + for (let i = 0; i < value.length; i++) { + if (value.charCodeAt(i) === invalidValueChar) { + throw new TypeError('Value contains invalid characters: "\\0"'); + } + } } } - return result; -}; +}); -// npm/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs -function buildFormatLongFn(args) { - return (options = {}) => { - const width = options.width ? String(options.width) : args.defaultWidth; - const format2 = args.formats[width] || args.formats[args.defaultWidth]; - return format2; - }; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/mainModule.js +var require_mainModule = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/mainModule.js"(exports2) { + "use strict"; + var _a; + var _b; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mainModule = void 0; + var path_1 = require("path"); + var url_1 = require("url"); + exports2.mainModule = (0, url_1.pathToFileURL)((_b = (_a = require.main) === null || _a === void 0 ? void 0 : _a.filename) !== null && _b !== void 0 ? _b : (0, path_1.join)(__dirname, "$deno$repl.ts")).href; + } +}); -// npm/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs -var dateFormats = { - full: "EEEE, MMMM do, y", - long: "MMMM do, y", - medium: "MMM d, y", - short: "MM/dd/yyyy" -}; -var timeFormats = { - full: "h:mm:ss a zzzz", - long: "h:mm:ss a z", - medium: "h:mm:ss a", - short: "h:mm a" -}; -var dateTimeFormats = { - full: "{{date}} 'at' {{time}}", - long: "{{date}} 'at' {{time}}", - medium: "{{date}}, {{time}}", - short: "{{date}}, {{time}}" -}; -var formatLong = { - date: buildFormatLongFn({ - formats: dateFormats, - defaultWidth: "full" - }), - time: buildFormatLongFn({ - formats: timeFormats, - defaultWidth: "full" - }), - dateTime: buildFormatLongFn({ - formats: dateTimeFormats, - defaultWidth: "full" - }) -}; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/metrics.js +var require_metrics = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/metrics.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.metrics = void 0; + var metrics = function metrics2() { + return { + opsDispatched: 0, + opsDispatchedSync: 0, + opsDispatchedAsync: 0, + opsDispatchedAsyncUnref: 0, + opsCompleted: 0, + opsCompletedSync: 0, + opsCompletedAsync: 0, + opsCompletedAsyncUnref: 0, + bytesSentControl: 0, + bytesSentData: 0, + bytesReceived: 0, + ops: {} + }; + }; + exports2.metrics = metrics; + } +}); -// npm/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs -var formatRelativeLocale = { - lastWeek: "'last' eeee 'at' p", - yesterday: "'yesterday at' p", - today: "'today at' p", - tomorrow: "'tomorrow at' p", - nextWeek: "eeee 'at' p", - other: "P" -}; -var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token]; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/noColor.js +var require_noColor = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/noColor.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.noColor = void 0; + exports2.noColor = process.env.NO_COLOR !== void 0; + } +}); -// npm/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs -function buildLocalizeFn(args) { - return (value, options) => { - const context2 = options?.context ? String(options.context) : "standalone"; - let valuesArray; - if (context2 === "formatting" && args.formattingValues) { - const defaultWidth = args.defaultFormattingWidth || args.defaultWidth; - const width = options?.width ? String(options.width) : defaultWidth; - valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth]; - } else { - const defaultWidth = args.defaultWidth; - const width = options?.width ? String(options.width) : args.defaultWidth; - valuesArray = args.values[width] || args.values[defaultWidth]; - } - const index = args.argumentCallback ? args.argumentCallback(value) : value; - return valuesArray[index]; - }; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/permissions.js +var require_permissions = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/permissions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.permissions = void 0; + var Permissions_js_1 = require_Permissions(); + exports2.permissions = new Permissions_js_1.Permissions(); + } +}); -// npm/node_modules/date-fns/locale/en-US/_lib/localize.mjs -var eraValues = { - narrow: ["B", "A"], - abbreviated: ["BC", "AD"], - wide: ["Before Christ", "Anno Domini"] -}; -var quarterValues = { - narrow: ["1", "2", "3", "4"], - abbreviated: ["Q1", "Q2", "Q3", "Q4"], - wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] -}; -var monthValues = { - narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], - abbreviated: [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" - ], - wide: [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" - ] -}; -var dayValues = { - narrow: ["S", "M", "T", "W", "T", "F", "S"], - short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - wide: [ - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday" - ] -}; -var dayPeriodValues = { - narrow: { - am: "a", - pm: "p", - midnight: "mi", - noon: "n", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - }, - abbreviated: { - am: "AM", - pm: "PM", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" - }, - wide: { - am: "a.m.", - pm: "p.m.", - midnight: "midnight", - noon: "noon", - morning: "morning", - afternoon: "afternoon", - evening: "evening", - night: "night" +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/pid.js +var require_pid = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/pid.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.pid = void 0; + exports2.pid = process.pid; } -}; -var formattingDayPeriodValues = { - narrow: { - am: "a", - pm: "p", - midnight: "mi", - noon: "n", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - }, - abbreviated: { - am: "AM", - pm: "PM", - midnight: "midnight", - noon: "noon", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" - }, - wide: { - am: "a.m.", - pm: "p.m.", - midnight: "midnight", - noon: "noon", - morning: "in the morning", - afternoon: "in the afternoon", - evening: "in the evening", - night: "at night" +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/ppid.js +var require_ppid = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/ppid.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ppid = void 0; + exports2.ppid = process.ppid; } -}; -var ordinalNumber = (dirtyNumber, _options) => { - const number = Number(dirtyNumber); - const rem100 = number % 100; - if (rem100 > 20 || rem100 < 10) { - switch (rem100 % 10) { - case 1: - return number + "st"; - case 2: - return number + "nd"; - case 3: - return number + "rd"; - } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/resources.js +var require_resources = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/resources.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resources = void 0; + var resources = function resources2() { + console.warn([ + "Deno.resources() shim returns a dummy object that does not update.", + "If you think this is a mistake, raise an issue at https://github.com/denoland/node_deno_shims/issues" + ].join("\n")); + return {}; + }; + exports2.resources = resources; } - return number + "th"; -}; -var localize = { - ordinalNumber, - era: buildLocalizeFn({ - values: eraValues, - defaultWidth: "wide" - }), - quarter: buildLocalizeFn({ - values: quarterValues, - defaultWidth: "wide", - argumentCallback: (quarter) => quarter - 1 - }), - month: buildLocalizeFn({ - values: monthValues, - defaultWidth: "wide" - }), - day: buildLocalizeFn({ - values: dayValues, - defaultWidth: "wide" - }), - dayPeriod: buildLocalizeFn({ - values: dayPeriodValues, - defaultWidth: "wide", - formattingValues: formattingDayPeriodValues, - defaultFormattingWidth: "wide" - }) -}; +}); -// npm/node_modules/date-fns/locale/_lib/buildMatchFn.mjs -function buildMatchFn(args) { - return (string, options = {}) => { - const width = options.width; - const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth]; - const matchResult = string.match(matchPattern); - if (!matchResult) { - return null; - } - const matchedString = matchResult[0]; - const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth]; - const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type - findKey(parsePatterns, (pattern) => pattern.test(matchedString)) - ); - let value; - value = args.valueCallback ? args.valueCallback(key) : key; - value = options.valueCallback ? ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type - options.valueCallback(value) - ) : value; - const rest = string.slice(matchedString.length); - return { value, rest }; - }; -} -function findKey(object, predicate) { - for (const key in object) { - if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) { - return key; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js +var require_std = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.stderr = exports2.stdout = exports2.stdin = void 0; + var node_stream_1 = __importDefault(require("node:stream")); + var node_tty_1 = __importDefault(require("node:tty")); + var readSync_js_1 = require_readSync(); + var writeSync_js_1 = require_writeSync(); + function chain(fn, cleanup) { + let prev; + return function _fn(...args) { + const curr = (prev || Promise.resolve()).then(() => fn(...args)).finally(cleanup || (() => { + })).then((result) => { + if (prev === curr) + prev = void 0; + return result; + }); + return prev = curr; + }; } + var stdinReadable; + exports2.stdin = { + rid: 0, + isTerminal() { + return node_tty_1.default.isatty(this.rid); + }, + read: chain((p) => { + return new Promise((resolve, reject) => { + process.stdin.resume(); + process.stdin.on("error", onerror); + process.stdin.once("readable", () => { + var _a; + process.stdin.off("error", onerror); + const data = (_a = process.stdin.read(p.length)) !== null && _a !== void 0 ? _a : process.stdin.read(); + if (data) { + p.set(data); + resolve(data.length > 0 ? data.length : null); + } else { + resolve(null); + } + }); + function onerror(error) { + reject(error); + process.stdin.off("error", onerror); + } + }); + }, () => process.stdin.pause()), + get readable() { + if (stdinReadable == null) { + stdinReadable = node_stream_1.default.Readable.toWeb(process.stdin); + } + return stdinReadable; + }, + readSync(buffer) { + return (0, readSync_js_1.readSync)(this.rid, buffer); + }, + close() { + process.stdin.destroy(); + }, + setRaw(mode, options) { + if (options === null || options === void 0 ? void 0 : options.cbreak) { + throw new Error("The cbreak option is not implemented."); + } + process.stdin.setRawMode(mode); + } + }; + var stdoutWritable; + exports2.stdout = { + rid: 1, + isTerminal() { + return node_tty_1.default.isatty(this.rid); + }, + write: chain((p) => { + return new Promise((resolve) => { + const result = process.stdout.write(p); + if (!result) { + process.stdout.once("drain", () => resolve(p.length)); + } else { + resolve(p.length); + } + }); + }), + get writable() { + if (stdoutWritable == null) { + stdoutWritable = node_stream_1.default.Writable.toWeb(process.stdout); + } + return stdoutWritable; + }, + writeSync(data) { + return (0, writeSync_js_1.writeSync)(this.rid, data); + }, + close() { + process.stdout.destroy(); + } + }; + var stderrWritable; + exports2.stderr = { + rid: 2, + isTerminal() { + return node_tty_1.default.isatty(this.rid); + }, + write: chain((p) => { + return new Promise((resolve) => { + const result = process.stderr.write(p); + if (!result) { + process.stderr.once("drain", () => resolve(p.length)); + } else { + resolve(p.length); + } + }); + }), + get writable() { + if (stderrWritable == null) { + stderrWritable = node_stream_1.default.Writable.toWeb(process.stderr); + } + return stderrWritable; + }, + writeSync(data) { + return (0, writeSync_js_1.writeSync)(this.rid, data); + }, + close() { + process.stderr.destroy(); + } + }; } - return void 0; -} -function findIndex(array, predicate) { - for (let key = 0; key < array.length; key++) { - if (predicate(array[key])) { - return key; - } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/version.js +var require_version = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.typescript = exports2.deno = void 0; + exports2.deno = "1.40.3"; + exports2.typescript = "5.3.3"; } - return void 0; -} +}); -// npm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs -function buildMatchPatternFn(args) { - return (string, options = {}) => { - const matchResult = string.match(args.matchPattern); - if (!matchResult) return null; - const matchedString = matchResult[0]; - const parseResult = string.match(args.parsePattern); - if (!parseResult) return null; - let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]; - value = options.valueCallback ? options.valueCallback(value) : value; - const rest = string.slice(matchedString.length); - return { value, rest }; - }; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/version.js +var require_version2 = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/version.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = void 0; + var version_js_1 = require_version(); + exports2.version = { + deno: version_js_1.deno, + typescript: version_js_1.typescript, + v8: process.versions.v8 + }; + } +}); -// npm/node_modules/date-fns/locale/en-US/_lib/match.mjs -var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; -var parseOrdinalNumberPattern = /\d+/i; -var matchEraPatterns = { - narrow: /^(b|a)/i, - abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, - wide: /^(before christ|before common era|anno domini|common era)/i -}; -var parseEraPatterns = { - any: [/^b/i, /^(a|c)/i] -}; -var matchQuarterPatterns = { - narrow: /^[1234]/i, - abbreviated: /^q[1234]/i, - wide: /^[1234](th|st|nd|rd)? quarter/i -}; -var parseQuarterPatterns = { - any: [/1/i, /2/i, /3/i, /4/i] -}; -var matchMonthPatterns = { - narrow: /^[jfmasond]/i, - abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, - wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i -}; -var parseMonthPatterns = { - narrow: [ - /^j/i, - /^f/i, - /^m/i, - /^a/i, - /^m/i, - /^j/i, - /^j/i, - /^a/i, - /^s/i, - /^o/i, - /^n/i, - /^d/i - ], - any: [ - /^ja/i, - /^f/i, - /^mar/i, - /^ap/i, - /^may/i, - /^jun/i, - /^jul/i, - /^au/i, - /^s/i, - /^o/i, - /^n/i, - /^d/i - ] -}; -var matchDayPatterns = { - narrow: /^[smtwf]/i, - short: /^(su|mo|tu|we|th|fr|sa)/i, - abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, - wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i -}; -var parseDayPatterns = { - narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], - any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] -}; -var matchDayPeriodPatterns = { - narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, - any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i -}; -var parseDayPeriodPatterns = { - any: { - am: /^a/i, - pm: /^p/i, - midnight: /^mi/i, - noon: /^no/i, - morning: /morning/i, - afternoon: /afternoon/i, - evening: /evening/i, - night: /night/i +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables.js +var require_variables = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.version = exports2.resources = exports2.ppid = exports2.pid = exports2.permissions = exports2.noColor = exports2.metrics = exports2.mainModule = exports2.errors = exports2.env = exports2.customInspect = exports2.build = void 0; + var build_js_1 = require_build(); + Object.defineProperty(exports2, "build", { enumerable: true, get: function() { + return build_js_1.build; + } }); + var customInspect_js_1 = require_customInspect(); + Object.defineProperty(exports2, "customInspect", { enumerable: true, get: function() { + return customInspect_js_1.customInspect; + } }); + var env_js_1 = require_env(); + Object.defineProperty(exports2, "env", { enumerable: true, get: function() { + return env_js_1.env; + } }); + exports2.errors = __importStar(require_errors2()); + var mainModule_js_1 = require_mainModule(); + Object.defineProperty(exports2, "mainModule", { enumerable: true, get: function() { + return mainModule_js_1.mainModule; + } }); + var metrics_js_1 = require_metrics(); + Object.defineProperty(exports2, "metrics", { enumerable: true, get: function() { + return metrics_js_1.metrics; + } }); + var noColor_js_1 = require_noColor(); + Object.defineProperty(exports2, "noColor", { enumerable: true, get: function() { + return noColor_js_1.noColor; + } }); + var permissions_js_1 = require_permissions(); + Object.defineProperty(exports2, "permissions", { enumerable: true, get: function() { + return permissions_js_1.permissions; + } }); + var pid_js_1 = require_pid(); + Object.defineProperty(exports2, "pid", { enumerable: true, get: function() { + return pid_js_1.pid; + } }); + var ppid_js_1 = require_ppid(); + Object.defineProperty(exports2, "ppid", { enumerable: true, get: function() { + return ppid_js_1.ppid; + } }); + var resources_js_1 = require_resources(); + Object.defineProperty(exports2, "resources", { enumerable: true, get: function() { + return resources_js_1.resources; + } }); + __exportStar(require_std(), exports2); + var version_js_1 = require_version2(); + Object.defineProperty(exports2, "version", { enumerable: true, get: function() { + return version_js_1.version; + } }); } -}; -var match = { - ordinalNumber: buildMatchPatternFn({ - matchPattern: matchOrdinalNumberPattern, - parsePattern: parseOrdinalNumberPattern, - valueCallback: (value) => parseInt(value, 10) - }), - era: buildMatchFn({ - matchPatterns: matchEraPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseEraPatterns, - defaultParseWidth: "any" - }), - quarter: buildMatchFn({ - matchPatterns: matchQuarterPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseQuarterPatterns, - defaultParseWidth: "any", - valueCallback: (index) => index + 1 - }), - month: buildMatchFn({ - matchPatterns: matchMonthPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseMonthPatterns, - defaultParseWidth: "any" - }), - day: buildMatchFn({ - matchPatterns: matchDayPatterns, - defaultMatchWidth: "wide", - parsePatterns: parseDayPatterns, - defaultParseWidth: "any" - }), - dayPeriod: buildMatchFn({ - matchPatterns: matchDayPeriodPatterns, - defaultMatchWidth: "any", - parsePatterns: parseDayPeriodPatterns, - defaultParseWidth: "any" - }) -}; +}); -// npm/node_modules/date-fns/locale/en-US.mjs -var enUS = { - code: "en-US", - formatDistance, - formatLong, - formatRelative, - localize, - match, - options: { - weekStartsOn: 0, - firstWeekContainsDate: 1 +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/addSignalListener.js +var require_addSignalListener = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/addSignalListener.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.addSignalListener = void 0; + var process_1 = __importDefault(require("process")); + function denoSignalToNodeJs(signal) { + if (signal === "SIGEMT") { + throw new Error("SIGEMT is not supported"); + } + return signal; + } + var addSignalListener = (signal, handler2) => { + process_1.default.addListener(denoSignalToNodeJs(signal), handler2); + }; + exports2.addSignalListener = addSignalListener; } -}; - -// npm/node_modules/date-fns/getDayOfYear.mjs -function getDayOfYear(date) { - const _date = toDate(date); - const diff = differenceInCalendarDays(_date, startOfYear(_date)); - const dayOfYear = diff + 1; - return dayOfYear; -} +}); -// npm/node_modules/date-fns/getISOWeek.mjs -function getISOWeek(date) { - const _date = toDate(date); - const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date); - return Math.round(diff / millisecondsInWeek) + 1; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chdir.js +var require_chdir = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chdir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chdir = void 0; + var url_1 = require("url"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var chdir = function(path) { + try { + return process.chdir(path instanceof URL ? (0, url_1.fileURLToPath)(path) : path); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), chdir '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.chdir = chdir; + } +}); -// npm/node_modules/date-fns/getWeekYear.mjs -function getWeekYear(date, options) { - const _date = toDate(date); - const year = _date.getFullYear(); - const defaultOptions2 = getDefaultOptions(); - const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; - const firstWeekOfNextYear = constructFrom(date, 0); - firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate); - firstWeekOfNextYear.setHours(0, 0, 0, 0); - const startOfNextYear = startOfWeek(firstWeekOfNextYear, options); - const firstWeekOfThisYear = constructFrom(date, 0); - firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate); - firstWeekOfThisYear.setHours(0, 0, 0, 0); - const startOfThisYear = startOfWeek(firstWeekOfThisYear, options); - if (_date.getTime() >= startOfNextYear.getTime()) { - return year + 1; - } else if (_date.getTime() >= startOfThisYear.getTime()) { - return year; - } else { - return year - 1; +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmod.js +var require_chmod = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmod.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chmod = void 0; + var fs = __importStar(require("fs/promises")); + exports2.chmod = fs.chmod; } -} +}); -// npm/node_modules/date-fns/startOfWeekYear.mjs -function startOfWeekYear(date, options) { - const defaultOptions2 = getDefaultOptions(); - const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; - const year = getWeekYear(date, options); - const firstWeek = constructFrom(date, 0); - firstWeek.setFullYear(year, 0, firstWeekContainsDate); - firstWeek.setHours(0, 0, 0, 0); - const _date = startOfWeek(firstWeek, options); - return _date; -} +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmodSync.js +var require_chmodSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chmodSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chmodSync = void 0; + var fs = __importStar(require("fs")); + exports2.chmodSync = fs.chmodSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chown.js +var require_chown = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chown.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chown = void 0; + var fs = __importStar(require("fs/promises")); + var chown = async (path, uid, gid) => await fs.chown(path, uid !== null && uid !== void 0 ? uid : -1, gid !== null && gid !== void 0 ? gid : -1); + exports2.chown = chown; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chownSync.js +var require_chownSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/chownSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.chownSync = void 0; + var fs = __importStar(require("fs")); + var chownSync = (path, uid, gid) => fs.chownSync(path, uid !== null && uid !== void 0 ? uid : -1, gid !== null && gid !== void 0 ? gid : -1); + exports2.chownSync = chownSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/close.js +var require_close = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/close.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.close = void 0; + var fs = __importStar(require("fs")); + exports2.close = fs.closeSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/Conn.js +var require_Conn = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/Conn.js"(exports2) { + "use strict"; + var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; + }; + var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + var _Conn_socket; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.TlsConn = exports2.Conn = void 0; + var net_1 = require("net"); + var FsFile_js_1 = require_FsFile(); + var Conn = class extends FsFile_js_1.FsFile { + constructor(rid, localAddr, remoteAddr, socket) { + super(rid); + this.rid = rid; + this.localAddr = localAddr; + this.remoteAddr = remoteAddr; + _Conn_socket.set(this, void 0); + __classPrivateFieldSet(this, _Conn_socket, socket || new net_1.Socket({ fd: rid }), "f"); + } + [(_Conn_socket = /* @__PURE__ */ new WeakMap(), Symbol.dispose)]() { + this.close(); + } + async closeWrite() { + await new Promise((resolve) => __classPrivateFieldGet(this, _Conn_socket, "f").end(resolve)); + } + setNoDelay(enable) { + __classPrivateFieldGet(this, _Conn_socket, "f").setNoDelay(enable); + } + setKeepAlive(enable) { + __classPrivateFieldGet(this, _Conn_socket, "f").setKeepAlive(enable); + } + ref() { + __classPrivateFieldGet(this, _Conn_socket, "f").ref(); + } + unref() { + __classPrivateFieldGet(this, _Conn_socket, "f").unref(); + } + }; + exports2.Conn = Conn; + var TlsConn = class extends Conn { + handshake() { + console.warn("@deno/shim-deno: Handshake is not supported."); + return Promise.resolve({ + alpnProtocol: null + }); + } + }; + exports2.TlsConn = TlsConn; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connect.js +var require_connect2 = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connect.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connect = void 0; + var net_1 = require("net"); + var Conn_js_1 = require_Conn(); + var connect = function connect2(options) { + if (options.transport === "unix") { + throw new Error("Unstable UnixConnectOptions is not implemented"); + } + const { transport = "tcp", hostname = "127.0.0.1", port } = options; + if (transport !== "tcp") { + throw new Error("Deno.connect is only implemented for transport: tcp"); + } + const socket = (0, net_1.createConnection)({ port, host: hostname }); + socket.on("error", (err) => console.error(err)); + return new Promise((resolve) => { + socket.once("connect", () => { + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr, socket)); + }); + }); + }; + exports2.connect = connect; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFile.js +var require_readTextFile = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readTextFile = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readTextFile = async (path, { signal } = {}) => { + try { + return await (0, promises_1.readFile)(path, { encoding: "utf8", signal }); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readTextFile = readTextFile; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connectTls.js +var require_connectTls = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/connectTls.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.connectTls = void 0; + var tls_1 = require("tls"); + var Conn_js_1 = require_Conn(); + var readTextFile_js_1 = require_readTextFile(); + var connectTls = async function connectTls2({ port, hostname = "127.0.0.1", certFile }) { + const cert = certFile && await (0, readTextFile_js_1.readTextFile)(certFile); + const socket = (0, tls_1.connect)({ port, host: hostname, cert }); + return new Promise((resolve) => { + socket.on("connect", () => { + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr, socket)); + }); + }); + }; + exports2.connectTls = connectTls; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/consoleSize.js +var require_consoleSize = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/consoleSize.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.consoleSize = void 0; + var consoleSize = function consoleSize2() { + const pipes = [process.stderr, process.stdout]; + for (const pipe of pipes) { + if (pipe.columns != null) { + const { columns, rows } = pipe; + return { columns, rows }; + } + } + throw new Error("The handle is invalid."); + }; + exports2.consoleSize = consoleSize; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/consts.js +var require_consts = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/consts.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_BUFFER_SIZE = void 0; + exports2.DEFAULT_BUFFER_SIZE = 32 * 1024; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copy.js +var require_copy = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copy = void 0; + var consts_js_1 = require_consts(); + var copy = async function copy2(src, dst, options) { + var _a; + let n = 0; + const bufSize = (_a = options === null || options === void 0 ? void 0 : options.bufSize) !== null && _a !== void 0 ? _a : consts_js_1.DEFAULT_BUFFER_SIZE; + const b = new Uint8Array(bufSize); + let gotEOF = false; + while (gotEOF === false) { + const result = await src.read(b); + if (result === null) { + gotEOF = true; + } else { + let nwritten = 0; + while (nwritten < result) { + nwritten += await dst.write(b.subarray(nwritten, result)); + } + n += nwritten; + } + } + return n; + }; + exports2.copy = copy; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFile.js +var require_copyFile = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFile.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyFile = void 0; + var fs = __importStar(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var errors = __importStar(require_errors2()); + var copyFile = async (src, dest) => { + try { + await fs.copyFile(src, dest); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { + throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.copyFile = copyFile; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFileSync.js +var require_copyFileSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/copyFileSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.copyFileSync = void 0; + var fs = __importStar(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var errors = __importStar(require_errors2()); + var copyFileSync = (src, dest) => { + try { + fs.copyFileSync(src, dest); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { + throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.copyFileSync = copyFileSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/fs_flags.js +var require_fs_flags = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/fs_flags.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getFsFlag = exports2.getCreationFlag = exports2.getAccessFlag = void 0; + var errors = __importStar(require_errors2()); + var fs_1 = require("fs"); + var os_1 = __importDefault(require("os")); + var { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY } = fs_1.constants; + function getAccessFlag(opts) { + if (opts.read && !opts.write && !opts.append) + return O_RDONLY; + if (!opts.read && opts.write && !opts.append) + return O_WRONLY; + if (opts.read && opts.write && !opts.append) + return O_RDWR; + if (!opts.read && opts.append) + return O_WRONLY | O_APPEND; + if (opts.read && opts.append) + return O_RDWR | O_APPEND; + if (!opts.read && !opts.write && !opts.append) { + throw new errors.BadResource("EINVAL: One of 'read', 'write', 'append' is required to open file."); + } + throw new errors.BadResource("EINVAL: Invalid fs flags."); + } + exports2.getAccessFlag = getAccessFlag; + function getCreationFlag(opts) { + if (!opts.write && !opts.append) { + if (opts.truncate || opts.create || opts.createNew) { + throw new errors.BadResource("EINVAL: One of 'write', 'append' is required to 'truncate', 'create' or 'createNew' file."); + } + } + if (opts.append) { + if (opts.truncate && !opts.createNew) { + throw new errors.BadResource("EINVAL: unexpected 'truncate': true and 'createNew': false when 'append' is true."); + } + } + if (!opts.create && !opts.truncate && !opts.createNew) + return 0; + if (opts.create && !opts.truncate && !opts.createNew) + return O_CREAT; + if (!opts.create && opts.truncate && !opts.createNew) { + if (os_1.default.platform() === "win32") { + return O_CREAT | O_TRUNC; + } else { + return O_TRUNC; + } + } + if (opts.create && opts.truncate && !opts.createNew) { + return O_CREAT | O_TRUNC; + } + if (opts.createNew) + return O_CREAT | O_EXCL; + throw new errors.BadResource("EINVAL: Invalid fs flags."); + } + exports2.getCreationFlag = getCreationFlag; + function getFsFlag(flags) { + return getAccessFlag(flags) | getCreationFlag(flags); + } + exports2.getFsFlag = getFsFlag; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/open.js +var require_open = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/open.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.open = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var FsFile_js_1 = require_FsFile(); + var fs_flags_js_1 = require_fs_flags(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var nodeOpen = (0, util_1.promisify)(fs_1.open); + var open = async function open2(path, { read, write, append, truncate, create, createNew, mode = 438 } = { + read: true + }) { + const flagMode = (0, fs_flags_js_1.getFsFlag)({ + read, + write, + append, + truncate, + create, + createNew + }); + try { + const fd = await nodeOpen(path, flagMode, mode); + return new FsFile_js_1.File(fd); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.open = open; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/create.js +var require_create = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/create.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var open_js_1 = require_open(); + var create = async function create2(path) { + return await (0, open_js_1.open)(path, { write: true, create: true, truncate: true }); + }; + exports2.create = create; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/openSync.js +var require_openSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/openSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.openSync = void 0; + var fs_1 = require("fs"); + var FsFile_js_1 = require_FsFile(); + var fs_flags_js_1 = require_fs_flags(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var openSync = function openSync2(path, { read, write, append, truncate, create, createNew, mode = 438 } = { + read: true + }) { + const flagMode = (0, fs_flags_js_1.getFsFlag)({ + read, + write, + append, + truncate, + create, + createNew + }); + try { + const fd = (0, fs_1.openSync)(path, flagMode, mode); + return new FsFile_js_1.File(fd); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.openSync = openSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/createSync.js +var require_createSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/createSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.createSync = void 0; + var openSync_js_1 = require_openSync(); + var createSync = function createSync2(path) { + return (0, openSync_js_1.openSync)(path, { + create: true, + truncate: true, + read: true, + write: true + }); + }; + exports2.createSync = createSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/cwd.js +var require_cwd = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/cwd.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cwd = void 0; + exports2.cwd = process.cwd; + } +}); + +// npm/node_modules/isexe/dist/cjs/posix.js +var require_posix = __commonJS({ + "npm/node_modules/isexe/dist/cjs/posix.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = exports2.isexe = void 0; + var fs_1 = require("fs"); + var promises_1 = require("fs/promises"); + var isexe = async (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await (0, promises_1.stat)(path), options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.isexe = isexe; + var sync = (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat((0, fs_1.statSync)(path), options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.sync = sync; + var checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); + var checkMode = (stat, options) => { + const myUid = options.uid ?? process.getuid?.(); + const myGroups = options.groups ?? process.getgroups?.() ?? []; + const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; + if (myUid === void 0 || myGid === void 0) { + throw new Error("cannot get uid or gid"); + } + const groups2 = /* @__PURE__ */ new Set([myGid, ...myGroups]); + const mod = stat.mode; + const uid = stat.uid; + const gid = stat.gid; + const u = parseInt("100", 8); + const g = parseInt("010", 8); + const o = parseInt("001", 8); + const ug = u | g; + return !!(mod & o || mod & g && groups2.has(gid) || mod & u && uid === myUid || mod & ug && myUid === 0); + }; + } +}); + +// npm/node_modules/isexe/dist/cjs/win32.js +var require_win32 = __commonJS({ + "npm/node_modules/isexe/dist/cjs/win32.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = exports2.isexe = void 0; + var fs_1 = require("fs"); + var promises_1 = require("fs/promises"); + var isexe = async (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat(await (0, promises_1.stat)(path), path, options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.isexe = isexe; + var sync = (path, options = {}) => { + const { ignoreErrors = false } = options; + try { + return checkStat((0, fs_1.statSync)(path), path, options); + } catch (e) { + const er = e; + if (ignoreErrors || er.code === "EACCES") + return false; + throw er; + } + }; + exports2.sync = sync; + var checkPathExt = (path, options) => { + const { pathExt = process.env.PATHEXT || "" } = options; + const peSplit = pathExt.split(";"); + if (peSplit.indexOf("") !== -1) { + return true; + } + for (let i = 0; i < peSplit.length; i++) { + const p = peSplit[i].toLowerCase(); + const ext = path.substring(path.length - p.length).toLowerCase(); + if (p && ext === p) { + return true; + } + } + return false; + }; + var checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); + } +}); + +// npm/node_modules/isexe/dist/cjs/options.js +var require_options = __commonJS({ + "npm/node_modules/isexe/dist/cjs/options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// npm/node_modules/isexe/dist/cjs/index.js +var require_cjs = __commonJS({ + "npm/node_modules/isexe/dist/cjs/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.sync = exports2.isexe = exports2.posix = exports2.win32 = void 0; + var posix = __importStar(require_posix()); + exports2.posix = posix; + var win32 = __importStar(require_win32()); + exports2.win32 = win32; + __exportStar(require_options(), exports2); + var platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; + var impl = platform === "win32" ? win32 : posix; + exports2.isexe = impl.isexe; + exports2.sync = impl.sync; + } +}); + +// npm/node_modules/which/lib/index.js +var require_lib2 = __commonJS({ + "npm/node_modules/which/lib/index.js"(exports2, module2) { + var { isexe, sync: isexeSync } = require_cjs(); + var { join, delimiter, sep, posix } = require("path"); + var isWindows = process.platform === "win32"; + var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1")); + var rRel = new RegExp(`^\\.${rSlash.source}`); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, { + path: optPath = process.env.PATH, + pathExt: optPathExt = process.env.PATHEXT, + delimiter: optDelimiter = delimiter + }) => { + const pathEnv = cmd.match(rSlash) ? [""] : [ + // windows always checks the cwd first + ...isWindows ? [process.cwd()] : [], + ...(optPath || /* istanbul ignore next: very unusual */ + "").split(optDelimiter) + ]; + if (isWindows) { + const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter); + const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]); + if (cmd.includes(".") && pathExt[0] !== "") { + pathExt.unshift(""); + } + return { pathEnv, pathExt, pathExtExe }; + } + return { pathEnv, pathExt: [""] }; + }; + var getPathPart = (raw, cmd) => { + const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw; + const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ""; + return prefix + join(pathPart, cmd); + }; + var which = async (cmd, opt = {}) => { + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (const envPart of pathEnv) { + const p = getPathPart(envPart, cmd); + for (const ext of pathExt) { + const withExt = p + ext; + const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true }); + if (is) { + if (!opt.all) { + return withExt; + } + found.push(withExt); + } + } + } + if (opt.all && found.length) { + return found; + } + if (opt.nothrow) { + return null; + } + throw getNotFoundError(cmd); + }; + var whichSync = (cmd, opt = {}) => { + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (const pathEnvPart of pathEnv) { + const p = getPathPart(pathEnvPart, cmd); + for (const ext of pathExt) { + const withExt = p + ext; + const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }); + if (is) { + if (!opt.all) { + return withExt; + } + found.push(withExt); + } + } + } + if (opt.all && found.length) { + return found; + } + if (opt.nothrow) { + return null; + } + throw getNotFoundError(cmd); + }; + module2.exports = which; + which.sync = whichSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/execPath.js +var require_execPath = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/execPath.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.execPath = void 0; + var which_1 = __importDefault(require_lib2()); + var execPath = () => which_1.default.sync("deno"); + exports2.execPath = execPath; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/exit.js +var require_exit = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/exit.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.exit = void 0; + var exit = function exit2(code) { + return process.exit(code); + }; + exports2.exit = exit; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsync.js +var require_fsync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsync = void 0; + var fs_1 = require("fs"); + var util_1 = require("util"); + var fsync = function fsync2(rid) { + return (0, util_1.promisify)(fs_1.fsync)(rid); + }; + exports2.fsync = fsync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsyncSync.js +var require_fsyncSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/fsyncSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.fsyncSync = void 0; + var fs_1 = require("fs"); + var fsyncSync = function fsyncSync2(rid) { + return (0, fs_1.fsyncSync)(rid); + }; + exports2.fsyncSync = fsyncSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/gid.js +var require_gid = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/gid.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.gid = void 0; + var process_1 = __importDefault(require("process")); + exports2.gid = (_a = process_1.default.getgid) !== null && _a !== void 0 ? _a : () => null; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/hostname.js +var require_hostname = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/hostname.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hostname = void 0; + var os = __importStar(require("os")); + var hostname = function hostname2() { + return os.hostname(); + }; + exports2.hostname = hostname; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/inspect.js +var require_inspect = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/inspect.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.inspect = void 0; + var util = __importStar(require("util")); + var inspect = (value, options = {}) => util.inspect(value, options); + exports2.inspect = inspect; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/kill.js +var require_kill = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/kill.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.kill = void 0; + var os_1 = __importDefault(require("os")); + var process_1 = __importDefault(require("process")); + var kill = function(pid, signo) { + if (pid < 0 && os_1.default.platform() === "win32") { + throw new TypeError("Invalid pid"); + } + process_1.default.kill(pid, signo); + }; + exports2.kill = kill; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/link.js +var require_link = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/link.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.link = void 0; + var fs = __importStar(require("fs/promises")); + exports2.link = fs.link; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/linkSync.js +var require_linkSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/linkSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.linkSync = void 0; + var fs = __importStar(require("fs")); + exports2.linkSync = fs.linkSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/Listener.js +var require_Listener = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/Listener.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; + }; + var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + var _Listener_listener; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Listener = void 0; + var close_js_1 = require_close(); + var errors = __importStar(require_errors2()); + var Listener = class { + constructor(rid, addr, listener) { + this.rid = rid; + this.addr = addr; + _Listener_listener.set(this, void 0); + __classPrivateFieldSet(this, _Listener_listener, listener, "f"); + } + [(_Listener_listener = /* @__PURE__ */ new WeakMap(), Symbol.dispose)]() { + this.close(); + } + async accept() { + if (!__classPrivateFieldGet(this, _Listener_listener, "f")) { + throw new errors.BadResource("Listener not initialised"); + } + const result = await __classPrivateFieldGet(this, _Listener_listener, "f").next(); + if (result.done) { + throw new errors.BadResource("Server not listening"); + } + return result.value; + } + async next() { + let conn; + try { + conn = await this.accept(); + } catch (error) { + if (error instanceof errors.BadResource) { + return { value: void 0, done: true }; + } + throw error; + } + return { value: conn, done: false }; + } + return(value) { + this.close(); + return Promise.resolve({ value, done: true }); + } + close() { + (0, close_js_1.close)(this.rid); + } + ref() { + throw new Error("Not implemented"); + } + unref() { + throw new Error("Not implemented"); + } + [Symbol.asyncIterator]() { + return this; + } + }; + exports2.Listener = Listener; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listen.js +var require_listen = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listen.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.listen = void 0; + var net_1 = require("net"); + var Conn_js_1 = require_Conn(); + var Listener_js_1 = require_Listener(); + async function* _listen(server, waitFor) { + await waitFor; + while (server.listening) { + yield new Promise((resolve) => server.once("connection", (socket) => { + socket.on("error", (err) => console.error(err)); + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr)); + })); + } + } + var listen = function listen2(options) { + if (options.transport === "unix") { + throw new Error("Unstable UnixListenOptions is not implemented"); + } + const { port, hostname = "0.0.0.0", transport = "tcp" } = options; + if (transport !== "tcp") { + throw new Error("Deno.listen is only implemented for transport: tcp"); + } + const server = (0, net_1.createServer)(); + const waitFor = new Promise((resolve) => ( + // server._handle.fd is assigned immediately on .listen() + server.listen(port, hostname, resolve) + )); + const listener = new Listener_js_1.Listener(server._handle.fd, { + hostname, + port, + transport: "tcp" + }, _listen(server, waitFor)); + return listener; + }; + exports2.listen = listen; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFileSync.js +var require_readTextFileSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readTextFileSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readTextFileSync = void 0; + var fs = __importStar(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readTextFileSync = function(path) { + try { + return fs.readFileSync(path, "utf8"); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readTextFileSync = readTextFileSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listenTls.js +var require_listenTls = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/listenTls.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.listenTls = void 0; + var tls_1 = require("tls"); + var Conn_js_1 = require_Conn(); + var Listener_js_1 = require_Listener(); + var readTextFileSync_js_1 = require_readTextFileSync(); + async function* _listen(server, waitFor) { + await waitFor; + while (server.listening) { + yield new Promise((resolve) => server.once("secureConnection", (socket) => { + socket.on("error", (err) => console.error(err)); + const rid = socket._handle.fd; + const localAddr = { + // cannot be undefined while socket is connected + hostname: socket.localAddress, + port: socket.localPort, + transport: "tcp" + }; + const remoteAddr = { + // cannot be undefined while socket is connected + hostname: socket.remoteAddress, + port: socket.remotePort, + transport: "tcp" + }; + resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr)); + })); + } + } + var listenTls = function listen({ port, hostname = "0.0.0.0", transport = "tcp", certFile, keyFile }) { + if (transport !== "tcp") { + throw new Error("Deno.listen is only implemented for transport: tcp"); + } + const [cert, key] = [certFile, keyFile].map((f) => f == null ? void 0 : (0, readTextFileSync_js_1.readTextFileSync)(f)); + const server = (0, tls_1.createServer)({ cert, key }); + const waitFor = new Promise((resolve) => ( + // server._handle.fd is assigned immediately on .listen() + server.listen(port, hostname, resolve) + )); + const listener = new Listener_js_1.Listener(server._handle.fd, { + hostname, + port, + transport: "tcp" + }, _listen(server, waitFor)); + return listener; + }; + exports2.listenTls = listenTls; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/loadavg.js +var require_loadavg = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/loadavg.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.loadavg = void 0; + var os = __importStar(require("os")); + var loadavg = function loadavg2() { + return os.loadavg(); + }; + exports2.loadavg = loadavg; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstat.js +var require_lstat = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstat.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lstat = void 0; + var fs = __importStar(require("fs/promises")); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var lstat = async (path) => { + try { + return (0, stat_js_1.denoifyFileInfo)(await fs.lstat(path)); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.lstat = lstat; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstatSync.js +var require_lstatSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/lstatSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.lstatSync = void 0; + var fs = __importStar(require("fs")); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var lstatSync = (path) => { + try { + return (0, stat_js_1.denoifyFileInfo)(fs.lstatSync(path)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.lstatSync = lstatSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDir.js +var require_makeTempDir = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDir.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempDir = void 0; + var promises_1 = require("fs/promises"); + var path_1 = require("path"); + var os_1 = require("os"); + var makeTempDir = function makeTempDir2({ prefix = "" } = {}) { + return (0, promises_1.mkdtemp)((0, path_1.join)((0, os_1.tmpdir)(), prefix || "/")); + }; + exports2.makeTempDir = makeTempDir; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDirSync.js +var require_makeTempDirSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempDirSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempDirSync = void 0; + var fs_1 = require("fs"); + var path_1 = require("path"); + var os_1 = require("os"); + var makeTempDirSync = function makeTempDirSync2({ prefix = "" } = {}) { + return (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), prefix || "/")); + }; + exports2.makeTempDirSync = makeTempDirSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/random_id.js +var require_random_id = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/random_id.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.randomId = void 0; + var randomId = () => { + const n = (Math.random() * 1048575 * 1e6).toString(16); + return "" + n.slice(0, 6); + }; + exports2.randomId = randomId; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFile.js +var require_writeTextFile = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFile.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeTextFile = void 0; + var fs = __importStar(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var fs_flags_js_1 = require_fs_flags(); + var writeTextFile = async function writeTextFile2(path, data, { append = false, create = true, createNew = false, mode, signal } = {}) { + const truncate = create && !append; + const flag = (0, fs_flags_js_1.getFsFlag)({ + append, + create, + createNew, + truncate, + write: true + }); + try { + await fs.writeFile(path, data, { flag, mode, signal }); + if (mode !== void 0) + await fs.chmod(path, mode); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.writeTextFile = writeTextFile; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFile.js +var require_makeTempFile = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFile.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempFile = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var random_id_js_1 = require_random_id(); + var writeTextFile_js_1 = require_writeTextFile(); + var makeTempFile = async function makeTempFile2({ prefix = "" } = {}) { + const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)()); + await (0, writeTextFile_js_1.writeTextFile)(name, ""); + return name; + }; + exports2.makeTempFile = makeTempFile; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFileSync.js +var require_writeTextFileSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeTextFileSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeTextFileSync = void 0; + var fs = __importStar(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var writeTextFileSync = (path, data, { append = false, create = true, mode } = {}) => { + const flag = create ? append ? "a" : "w" : "r+"; + try { + fs.writeFileSync(path, data, { flag, mode }); + if (mode !== void 0) + fs.chmodSync(path, mode); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.writeTextFileSync = writeTextFileSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFileSync.js +var require_makeTempFileSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/makeTempFileSync.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.makeTempFileSync = void 0; + var os_1 = require("os"); + var path_1 = require("path"); + var random_id_js_1 = require_random_id(); + var writeTextFileSync_js_1 = require_writeTextFileSync(); + var makeTempFileSync = function makeTempFileSync2({ prefix = "" } = {}) { + const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)()); + (0, writeTextFileSync_js_1.writeTextFileSync)(name, ""); + return name; + }; + exports2.makeTempFileSync = makeTempFileSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/memoryUsage.js +var require_memoryUsage = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/memoryUsage.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.memoryUsage = void 0; + exports2.memoryUsage = process.memoryUsage; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdir.js +var require_mkdir = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mkdir = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var mkdir = async function mkdir2(path, options) { + try { + await (0, promises_1.mkdir)(path, options); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "EEXIST") { + throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.mkdir = mkdir; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdirSync.js +var require_mkdirSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/mkdirSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.mkdirSync = void 0; + var fs = __importStar(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var mkdirSync = (path, options) => { + try { + fs.mkdirSync(path, options); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "EEXIST") { + throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.mkdirSync = mkdirSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osRelease.js +var require_osRelease = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osRelease.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.osRelease = void 0; + var os_1 = require("os"); + var osRelease = function osRelease2() { + return (0, os_1.release)(); + }; + exports2.osRelease = osRelease; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osUptime.js +var require_osUptime = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/osUptime.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.osUptime = void 0; + var os_1 = require("os"); + var osUptime = function osUptime2() { + return (0, os_1.uptime)(); + }; + exports2.osUptime = osUptime; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDir.js +var require_readDir = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDir.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readDir = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readDir = async function* readDir2(path) { + try { + for await (const e of await (0, promises_1.opendir)(String(path))) { + const ent = { + name: e.name, + isFile: e.isFile(), + isDirectory: e.isDirectory(), + isSymlink: e.isSymbolicLink() + }; + yield ent; + } + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readDir = readDir; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDirSync.js +var require_readDirSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readDirSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readDirSync = void 0; + var fs_1 = require("fs"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readDirSync = function* readDir(path) { + try { + for (const e of (0, fs_1.readdirSync)(String(path), { withFileTypes: true })) { + const ent = { + name: e.name, + isFile: e.isFile(), + isDirectory: e.isDirectory(), + isSymlink: e.isSymbolicLink() + }; + yield ent; + } + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readDirSync = readDirSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFile.js +var require_readFile = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFile.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readFile = void 0; + var promises_1 = require("fs/promises"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readFile = async function readFile2(path, { signal } = {}) { + try { + const buf = await (0, promises_1.readFile)(path, { signal }); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readFile = readFile; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFileSync.js +var require_readFileSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readFileSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readFileSync = void 0; + var fs_1 = require("fs"); + var errorMap_js_1 = __importDefault(require_errorMap()); + var readFileSync = function readFileSync2(path) { + try { + const buf = (0, fs_1.readFileSync)(path); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.readFileSync = readFileSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLink.js +var require_readLink = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLink.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readLink = void 0; + var fs = __importStar(require("fs/promises")); + exports2.readLink = fs.readlink; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLinkSync.js +var require_readLinkSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/readLinkSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.readLinkSync = void 0; + var fs = __importStar(require("fs")); + exports2.readLinkSync = fs.readlinkSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPath.js +var require_realPath = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPath.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.realPath = void 0; + var fs = __importStar(require("fs/promises")); + exports2.realPath = fs.realpath; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPathSync.js +var require_realPathSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/realPathSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.realPathSync = void 0; + var fs = __importStar(require("fs")); + exports2.realPathSync = fs.realpathSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/remove.js +var require_remove2 = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/remove.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.remove = void 0; + var promises_1 = require("fs/promises"); + var remove = async function remove2(path, options = {}) { + const innerOptions = options.recursive ? { recursive: true, force: true } : {}; + try { + return await (0, promises_1.rm)(path, innerOptions); + } catch (err) { + if (err.code === "ERR_FS_EISDIR") { + return await (0, promises_1.rmdir)(path, innerOptions); + } else { + throw err; + } + } + }; + exports2.remove = remove; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSignalListener.js +var require_removeSignalListener = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSignalListener.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeSignalListener = void 0; + var process_1 = __importDefault(require("process")); + var removeSignalListener = (signal, handler2) => { + process_1.default.removeListener(signal, handler2); + }; + exports2.removeSignalListener = removeSignalListener; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSync.js +var require_removeSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/removeSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.removeSync = void 0; + var fs = __importStar(require("fs")); + var removeSync = (path, options = {}) => { + const innerOptions = options.recursive ? { recursive: true, force: true } : {}; + try { + fs.rmSync(path, innerOptions); + } catch (err) { + if (err.code === "ERR_FS_EISDIR") { + fs.rmdirSync(path, innerOptions); + } else { + throw err; + } + } + }; + exports2.removeSync = removeSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/rename.js +var require_rename = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/rename.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.rename = void 0; + var promises_1 = require("fs/promises"); + var rename = function rename2(oldpath, newpath) { + return (0, promises_1.rename)(oldpath, newpath); + }; + exports2.rename = rename; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/renameSync.js +var require_renameSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/renameSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.renameSync = void 0; + var fs = __importStar(require("fs")); + exports2.renameSync = fs.renameSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/resolveDns.js +var require_resolveDns = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/resolveDns.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.resolveDns = void 0; + var dns_1 = __importDefault(require("dns")); + var resolveDns = function resolveDns2(query, recordType, options) { + if (options) { + throw Error(`resolveDns option not implemnted yet`); + } + switch (recordType) { + case "A": + case "AAAA": + case "CNAME": + case "NS": + case "PTR": + return new Promise((resolve, reject) => { + dns_1.default.resolve(query, recordType, (err, addresses) => { + if (err) { + reject(err); + } else { + resolve(addresses); + } + }); + }); + case "ANAME": + case "CAA": + case "MX": + case "NAPTR": + case "SOA": + case "SRV": + case "TXT": + default: + throw Error(`resolveDns type ${recordType} not implemnted yet`); + } + }; + exports2.resolveDns = resolveDns; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/streams.js +var require_streams = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/streams.js"(exports2) { + "use strict"; + var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; + }; + var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + var _BufferStreamReader_instances; + var _BufferStreamReader_stream; + var _BufferStreamReader_error; + var _BufferStreamReader_ended; + var _BufferStreamReader_pendingActions; + var _BufferStreamReader_runPendingActions; + var _StreamWriter_stream; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StreamWriter = exports2.BufferStreamReader = void 0; + var BufferStreamReader = class { + constructor(stream) { + _BufferStreamReader_instances.add(this); + _BufferStreamReader_stream.set(this, void 0); + _BufferStreamReader_error.set(this, void 0); + _BufferStreamReader_ended.set(this, false); + _BufferStreamReader_pendingActions.set(this, []); + __classPrivateFieldSet(this, _BufferStreamReader_stream, stream, "f"); + __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").pause(); + __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").on("error", (error) => { + __classPrivateFieldSet(this, _BufferStreamReader_error, error, "f"); + __classPrivateFieldGet(this, _BufferStreamReader_instances, "m", _BufferStreamReader_runPendingActions).call(this); + }); + __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").on("readable", () => { + __classPrivateFieldGet(this, _BufferStreamReader_instances, "m", _BufferStreamReader_runPendingActions).call(this); + }); + __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").on("end", () => { + __classPrivateFieldSet(this, _BufferStreamReader_ended, true, "f"); + __classPrivateFieldGet(this, _BufferStreamReader_instances, "m", _BufferStreamReader_runPendingActions).call(this); + }); + } + readAll() { + return new Promise((resolve, reject) => { + const chunks = []; + const action = () => { + if (__classPrivateFieldGet(this, _BufferStreamReader_error, "f")) { + reject(__classPrivateFieldGet(this, _BufferStreamReader_error, "f")); + return; + } + const buffer = __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").read(); + if (buffer != null) { + chunks.push(buffer); + __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").push(action); + } else if (__classPrivateFieldGet(this, _BufferStreamReader_ended, "f")) { + const result = Buffer.concat(chunks); + resolve(result); + } else { + __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").push(action); + } + }; + action(); + }); + } + read(p) { + return new Promise((resolve, reject) => { + const action = () => { + if (__classPrivateFieldGet(this, _BufferStreamReader_error, "f")) { + reject(__classPrivateFieldGet(this, _BufferStreamReader_error, "f")); + return; + } + const readBuffer = __classPrivateFieldGet(this, _BufferStreamReader_stream, "f").read(p.byteLength); + if (readBuffer && readBuffer.byteLength > 0) { + readBuffer.copy(p, 0, 0, readBuffer.byteLength); + resolve(readBuffer.byteLength); + return; + } + if (__classPrivateFieldGet(this, _BufferStreamReader_ended, "f")) { + resolve(null); + } else { + __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").push(action); + } + }; + action(); + }); + } + }; + exports2.BufferStreamReader = BufferStreamReader; + _BufferStreamReader_stream = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_error = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_ended = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_pendingActions = /* @__PURE__ */ new WeakMap(), _BufferStreamReader_instances = /* @__PURE__ */ new WeakSet(), _BufferStreamReader_runPendingActions = function _BufferStreamReader_runPendingActions2() { + const errors = []; + for (const action of __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, "f").splice(0)) { + try { + action(); + } catch (err) { + errors.push(err); + } + } + if (errors.length > 0) { + throw errors.length > 1 ? new globalThis.AggregateError(errors) : errors[0]; + } + }; + var StreamWriter = class { + constructor(stream) { + _StreamWriter_stream.set(this, void 0); + __classPrivateFieldSet(this, _StreamWriter_stream, stream, "f"); + } + write(p) { + return new Promise((resolve, reject) => { + __classPrivateFieldGet(this, _StreamWriter_stream, "f").write(p, (err) => { + if (err) { + reject(err); + } else { + resolve(p.byteLength); + } + }); + }); + } + }; + exports2.StreamWriter = StreamWriter; + _StreamWriter_stream = /* @__PURE__ */ new WeakMap(); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/run.js +var require_run = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/run.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __classPrivateFieldSet = exports2 && exports2.__classPrivateFieldSet || function(receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value; + }; + var __classPrivateFieldGet = exports2 && exports2.__classPrivateFieldGet || function(receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var _Process_process; + var _Process_stderr; + var _Process_stdout; + var _Process_stdin; + var _Process_status; + var _Process_receivedStatus; + var _ProcessReadStream_stream; + var _ProcessReadStream_bufferStreamReader; + var _ProcessReadStream_closed; + var _ProcessWriteStream_stream; + var _ProcessWriteStream_streamWriter; + var _ProcessWriteStream_closed; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Process = exports2.run = void 0; + var child_process_1 = __importDefault(require("child_process")); + var fs_1 = __importDefault(require("fs")); + var os_1 = __importDefault(require("os")); + var url_1 = __importDefault(require("url")); + var events_1 = require("events"); + var which_1 = __importDefault(require_lib2()); + var streams_js_1 = require_streams(); + var errors = __importStar(require_errors2()); + var run = function run2(options) { + const [cmd, ...args] = options.cmd; + if (options.cwd && !fs_1.default.existsSync(options.cwd)) { + throw new Error("The directory name is invalid."); + } + const commandName = getCmd(cmd); + if (!which_1.default.sync(commandName, { nothrow: true })) { + throw new errors.NotFound("The system cannot find the file specified."); + } + const process3 = child_process_1.default.spawn(commandName, args, { + cwd: options.cwd, + env: getEnv(options), + uid: options.uid, + gid: options.gid, + shell: false, + stdio: [ + getStdio(options.stdin, "in"), + getStdio(options.stdout, "out"), + getStdio(options.stderr, "out") + ] + }); + return new Process(process3); + }; + exports2.run = run; + function getStdio(value, kind) { + if (value === "inherit" || value == null) { + return "inherit"; + } else if (value === "piped") { + return "pipe"; + } else if (value === "null") { + return "ignore"; + } else if (typeof value === "number") { + switch (kind) { + case "in": + return fs_1.default.createReadStream(null, { fd: value }); + case "out": + return fs_1.default.createWriteStream(null, { fd: value }); + default: { + const _assertNever = kind; + throw new Error("Unreachable."); + } + } + } else { + const _assertNever = value; + throw new Error("Unknown value."); + } + } + function getCmd(firstArg) { + if (firstArg instanceof URL) { + return url_1.default.fileURLToPath(firstArg); + } else { + return firstArg; + } + } + function getEnv(options) { + var _a; + const env = (_a = options.env) !== null && _a !== void 0 ? _a : {}; + for (const name in process.env) { + if (!Object.prototype.hasOwnProperty.call(env, name)) { + if (options.clearEnv) { + if (os_1.default.platform() === "win32") { + env[name] = ""; + } else { + delete env[name]; + } + } else { + env[name] = process.env[name]; + } + } + } + return env; + } + var Process = class { + /** @internal */ + constructor(process3) { + var _a, _b, _c; + _Process_process.set(this, void 0); + _Process_stderr.set(this, void 0); + _Process_stdout.set(this, void 0); + _Process_stdin.set(this, void 0); + _Process_status.set(this, void 0); + _Process_receivedStatus.set(this, false); + __classPrivateFieldSet(this, _Process_process, process3, "f"); + __classPrivateFieldSet(this, _Process_stdout, (_a = ProcessReadStream.fromNullable(__classPrivateFieldGet(this, _Process_process, "f").stdout)) !== null && _a !== void 0 ? _a : null, "f"); + __classPrivateFieldSet(this, _Process_stderr, (_b = ProcessReadStream.fromNullable(__classPrivateFieldGet(this, _Process_process, "f").stderr)) !== null && _b !== void 0 ? _b : null, "f"); + __classPrivateFieldSet(this, _Process_stdin, (_c = ProcessWriteStream.fromNullable(__classPrivateFieldGet(this, _Process_process, "f").stdin)) !== null && _c !== void 0 ? _c : null, "f"); + __classPrivateFieldSet(this, _Process_status, (0, events_1.once)(process3, "exit"), "f"); + } + get rid() { + return NaN; + } + get pid() { + return __classPrivateFieldGet(this, _Process_process, "f").pid; + } + get stdin() { + return __classPrivateFieldGet(this, _Process_stdin, "f"); + } + get stdout() { + return __classPrivateFieldGet(this, _Process_stdout, "f"); + } + get stderr() { + return __classPrivateFieldGet(this, _Process_stderr, "f"); + } + async status() { + const [receivedCode, signalName] = await __classPrivateFieldGet(this, _Process_status, "f"); + const signal = signalName ? os_1.default.constants.signals[signalName] : receivedCode > 128 ? receivedCode - 128 : void 0; + const code = receivedCode != null ? receivedCode : signal != null ? 128 + signal : void 0; + const success = code === 0; + __classPrivateFieldSet(this, _Process_receivedStatus, true, "f"); + return { code, signal, success }; + } + async output() { + if (!__classPrivateFieldGet(this, _Process_stdout, "f")) { + throw new TypeError("stdout was not piped"); + } + const result = await __classPrivateFieldGet(this, _Process_stdout, "f").readAll(); + __classPrivateFieldGet(this, _Process_stdout, "f").close(); + return result; + } + async stderrOutput() { + if (!__classPrivateFieldGet(this, _Process_stderr, "f")) { + throw new TypeError("stderr was not piped"); + } + const result = await __classPrivateFieldGet(this, _Process_stderr, "f").readAll(); + __classPrivateFieldGet(this, _Process_stderr, "f").close(); + return result; + } + close() { + __classPrivateFieldGet(this, _Process_process, "f").unref(); + __classPrivateFieldGet(this, _Process_process, "f").kill(); + } + kill(signo = "SIGTERM") { + if (__classPrivateFieldGet(this, _Process_receivedStatus, "f")) { + throw new errors.NotFound("entity not found"); + } + __classPrivateFieldGet(this, _Process_process, "f").kill(signo); + } + }; + exports2.Process = Process; + _Process_process = /* @__PURE__ */ new WeakMap(), _Process_stderr = /* @__PURE__ */ new WeakMap(), _Process_stdout = /* @__PURE__ */ new WeakMap(), _Process_stdin = /* @__PURE__ */ new WeakMap(), _Process_status = /* @__PURE__ */ new WeakMap(), _Process_receivedStatus = /* @__PURE__ */ new WeakMap(); + var ProcessReadStream = class _ProcessReadStream { + constructor(stream) { + _ProcessReadStream_stream.set(this, void 0); + _ProcessReadStream_bufferStreamReader.set(this, void 0); + _ProcessReadStream_closed.set(this, false); + __classPrivateFieldSet(this, _ProcessReadStream_stream, stream, "f"); + __classPrivateFieldSet(this, _ProcessReadStream_bufferStreamReader, new streams_js_1.BufferStreamReader(stream), "f"); + } + static fromNullable(stream) { + return stream ? new _ProcessReadStream(stream) : void 0; + } + readAll() { + if (__classPrivateFieldGet(this, _ProcessReadStream_closed, "f")) { + return Promise.resolve(new Uint8Array(0)); + } else { + return __classPrivateFieldGet(this, _ProcessReadStream_bufferStreamReader, "f").readAll(); + } + } + read(p) { + if (__classPrivateFieldGet(this, _ProcessReadStream_closed, "f")) { + return Promise.resolve(null); + } else { + return __classPrivateFieldGet(this, _ProcessReadStream_bufferStreamReader, "f").read(p); + } + } + close() { + __classPrivateFieldSet(this, _ProcessReadStream_closed, true, "f"); + __classPrivateFieldGet(this, _ProcessReadStream_stream, "f").destroy(); + } + get readable() { + throw new Error("Not implemented."); + } + get writable() { + throw new Error("Not implemented."); + } + }; + _ProcessReadStream_stream = /* @__PURE__ */ new WeakMap(), _ProcessReadStream_bufferStreamReader = /* @__PURE__ */ new WeakMap(), _ProcessReadStream_closed = /* @__PURE__ */ new WeakMap(); + var ProcessWriteStream = class _ProcessWriteStream { + constructor(stream) { + _ProcessWriteStream_stream.set(this, void 0); + _ProcessWriteStream_streamWriter.set(this, void 0); + _ProcessWriteStream_closed.set(this, false); + __classPrivateFieldSet(this, _ProcessWriteStream_stream, stream, "f"); + __classPrivateFieldSet(this, _ProcessWriteStream_streamWriter, new streams_js_1.StreamWriter(stream), "f"); + } + static fromNullable(stream) { + return stream ? new _ProcessWriteStream(stream) : void 0; + } + write(p) { + if (__classPrivateFieldGet(this, _ProcessWriteStream_closed, "f")) { + return Promise.resolve(0); + } else { + return __classPrivateFieldGet(this, _ProcessWriteStream_streamWriter, "f").write(p); + } + } + close() { + __classPrivateFieldSet(this, _ProcessWriteStream_closed, true, "f"); + __classPrivateFieldGet(this, _ProcessWriteStream_stream, "f").end(); + } + }; + _ProcessWriteStream_stream = /* @__PURE__ */ new WeakMap(), _ProcessWriteStream_streamWriter = /* @__PURE__ */ new WeakMap(), _ProcessWriteStream_closed = /* @__PURE__ */ new WeakMap(); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/shutdown.js +var require_shutdown = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/shutdown.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.shutdown = void 0; + var net_1 = require("net"); + var shutdown = async function shutdown2(rid) { + await new Promise((resolve) => new net_1.Socket({ fd: rid }).end(resolve)); + }; + exports2.shutdown = shutdown; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/statSync.js +var require_statSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/statSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.statSync = void 0; + var fs = __importStar(require("fs")); + var stat_js_1 = require_stat(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var statSync = (path) => { + try { + return (0, stat_js_1.denoifyFileInfo)(fs.statSync(path)); + } catch (err) { + throw (0, errorMap_js_1.default)(err); + } + }; + exports2.statSync = statSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlink.js +var require_symlink = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlink.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.symlink = void 0; + var fs = __importStar(require("fs/promises")); + var symlink = async (oldpath, newpath, options) => await fs.symlink(oldpath, newpath, options === null || options === void 0 ? void 0 : options.type); + exports2.symlink = symlink; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlinkSync.js +var require_symlinkSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/symlinkSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.symlinkSync = void 0; + var fs = __importStar(require("fs")); + var symlinkSync = (oldpath, newpath, options) => fs.symlinkSync(oldpath, newpath, options === null || options === void 0 ? void 0 : options.type); + exports2.symlinkSync = symlinkSync; + } +}); + +// npm/node_modules/@deno/shim-deno-test/dist/definitions.js +var require_definitions = __commonJS({ + "npm/node_modules/@deno/shim-deno-test/dist/definitions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.testDefinitions = void 0; + exports2.testDefinitions = []; + } +}); + +// npm/node_modules/@deno/shim-deno-test/dist/test.js +var require_test = __commonJS({ + "npm/node_modules/@deno/shim-deno-test/dist/test.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.test = void 0; + var definitions_js_1 = require_definitions(); + exports2.test = Object.assign(function test() { + handleDefinition(arguments); + }, { + ignore() { + handleDefinition(arguments, { ignore: true }); + }, + only() { + handleDefinition(arguments, { only: true }); + } + }); + function handleDefinition(args, additional) { + var _a, _b; + let testDef; + const firstArg = args[0]; + const secondArg = args[1]; + const thirdArg = args[2]; + if (typeof firstArg === "string") { + if (typeof secondArg === "object") { + if (typeof thirdArg === "function") { + if (secondArg.fn != null) { + throw new TypeError("Unexpected 'fn' field in options, test function is already provided as the third argument."); + } + } + if (secondArg.name != null) { + throw new TypeError("Unexpected 'name' field in options, test name is already provided as the first argument."); + } + testDef = { name: firstArg, fn: thirdArg, ...secondArg }; + } else { + testDef = { name: firstArg, fn: secondArg }; + } + } else if (firstArg instanceof Function) { + if (firstArg.name.length === 0) { + throw new TypeError("The test function must have a name"); + } + testDef = { fn: firstArg, name: firstArg.name }; + if (secondArg != null) { + throw new TypeError("Unexpected second argument to Deno.test()"); + } + } else if (typeof firstArg === "object") { + testDef = { ...firstArg }; + if (typeof secondArg === "function") { + testDef.fn = secondArg; + if (firstArg.fn != null) { + throw new TypeError("Unexpected 'fn' field in options, test function is already provided as the second argument."); + } + if (testDef.name == null) { + if (secondArg.name.length === 0) { + throw new TypeError("The test function must have a name"); + } + testDef.name = secondArg.name; + } + } else { + if (typeof firstArg.fn !== "function") { + throw new TypeError("Expected 'fn' field in the first argument to be a test function."); + } + } + } else { + throw new TypeError("Unknown test overload"); + } + if (typeof testDef.fn !== "function") { + throw new TypeError("Missing test function"); + } + if (((_b = (_a = testDef.name) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 0) { + throw new TypeError("The test name can't be empty"); + } + if (additional === null || additional === void 0 ? void 0 : additional.ignore) { + testDef.ignore = true; + } + if (additional === null || additional === void 0 ? void 0 : additional.only) { + testDef.only = true; + } + definitions_js_1.testDefinitions.push(testDef); + } + } +}); + +// npm/node_modules/@deno/shim-deno-test/dist/index.js +var require_dist = __commonJS({ + "npm/node_modules/@deno/shim-deno-test/dist/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.testDefinitions = exports2.Deno = void 0; + exports2.Deno = require_test(); + __exportStar(require_test(), exports2); + var definitions_js_1 = require_definitions(); + Object.defineProperty(exports2, "testDefinitions", { enumerable: true, get: function() { + return definitions_js_1.testDefinitions; + } }); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/test.js +var require_test2 = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/test.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.test = void 0; + var shim_deno_test_1 = require_dist(); + Object.defineProperty(exports2, "test", { enumerable: true, get: function() { + return shim_deno_test_1.test; + } }); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncate.js +var require_truncate = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncate.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.truncate = void 0; + var fs = __importStar(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var truncate = async (name, len) => { + try { + return await fs.truncate(name, len); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.truncate = truncate; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncateSync.js +var require_truncateSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/truncateSync.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.truncateSync = void 0; + var fs = __importStar(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var truncateSync = (name, len) => { + try { + return fs.truncateSync(name, len); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.truncateSync = truncateSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/uid.js +var require_uid = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/uid.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.uid = void 0; + var process_1 = __importDefault(require("process")); + exports2.uid = (_a = process_1.default.getuid) !== null && _a !== void 0 ? _a : () => null; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/internal/iterutil.js +var require_iterutil = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/internal/iterutil.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.merge = exports2.filterAsync = exports2.mapAsync = exports2.map = void 0; + function* map2(iter, f) { + for (const i of iter) { + yield f(i); + } + } + exports2.map = map2; + async function* mapAsync(iter, f) { + for await (const i of iter) { + yield f(i); + } + } + exports2.mapAsync = mapAsync; + async function* filterAsync(iter, filter) { + for await (const i of iter) { + if (filter(i)) { + yield i; + } + } + } + exports2.filterAsync = filterAsync; + async function* merge3(iterables) { + const racers = new Map(map2(map2(iterables, (iter) => iter[Symbol.asyncIterator]()), (iter) => [iter, iter.next()])); + while (racers.size > 0) { + const winner = await Promise.race(map2(racers.entries(), ([iter, prom]) => prom.then((result) => ({ result, iter })))); + if (winner.result.done) { + racers.delete(winner.iter); + } else { + yield await winner.result.value; + racers.set(winner.iter, winner.iter.next()); + } + } + } + exports2.merge = merge3; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/watchFs.js +var require_watchFs = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/watchFs.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.watchFs = void 0; + var promises_1 = require("fs/promises"); + var path_1 = require("path"); + var iterutil_js_1 = require_iterutil(); + var watchFs = function watchFs2(paths, options = { recursive: true }) { + paths = Array.isArray(paths) ? paths : [paths]; + const ac = new AbortController(); + const { signal } = ac; + const rid = -1; + const masterWatcher = (0, iterutil_js_1.merge)(paths.map((path) => (0, iterutil_js_1.mapAsync)((0, iterutil_js_1.filterAsync)((0, promises_1.watch)(path, { recursive: options === null || options === void 0 ? void 0 : options.recursive, signal }), (info2) => info2.filename != null), (info2) => ({ + kind: "modify", + paths: [(0, path_1.resolve)(path, info2.filename)] + })))); + function close() { + ac.abort(); + } + return Object.assign(masterWatcher, { + rid, + close, + [Symbol.dispose]: close + }); + }; + exports2.watchFs = watchFs; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFile.js +var require_writeFile = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFile.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeFile = void 0; + var fs = __importStar(require("fs/promises")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var fs_flags_js_1 = require_fs_flags(); + var writeFile = async function writeFile2(path, data, { append = false, create = true, createNew = false, mode, signal } = {}) { + const truncate = create && !append; + const flag = (0, fs_flags_js_1.getFsFlag)({ append, create, createNew, truncate, write: true }); + try { + await fs.writeFile(path, data, { flag, signal }); + if (mode != null) + await fs.chmod(path, mode); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.writeFile = writeFile; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFileSync.js +var require_writeFileSync = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions/writeFileSync.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeFileSync = void 0; + var os_1 = require("os"); + var openSync_js_1 = require_openSync(); + var errorMap_js_1 = __importDefault(require_errorMap()); + var statSync_js_1 = require_statSync(); + var chmodSync_js_1 = require_chmodSync(); + var writeFileSync = function writeFileSync2(path, data, options = {}) { + try { + if (options.create !== void 0) { + const create = !!options.create; + if (!create) { + (0, statSync_js_1.statSync)(path); + } + } + const openOptions = { + write: true, + create: true, + createNew: options.createNew, + append: !!options.append, + truncate: !options.append + }; + const file = (0, openSync_js_1.openSync)(path, openOptions); + if (options.mode !== void 0 && options.mode !== null && (0, os_1.platform)() !== "win32") { + (0, chmodSync_js_1.chmodSync)(path, options.mode); + } + let nwritten = 0; + while (nwritten < data.length) { + nwritten += file.writeSync(data.subarray(nwritten)); + } + file.close(); + } catch (e) { + throw (0, errorMap_js_1.default)(e); + } + }; + exports2.writeFileSync = writeFileSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/args.js +var require_args = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/args.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.args = void 0; + exports2.args = process.argv.slice(2); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/functions.js +var require_functions = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/functions.js"(exports2) { + "use strict"; + var __importDefault = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.read = exports2.osUptime = exports2.osRelease = exports2.openSync = exports2.open = exports2.mkdirSync = exports2.mkdir = exports2.memoryUsage = exports2.makeTempFileSync = exports2.makeTempFile = exports2.makeTempDirSync = exports2.makeTempDir = exports2.lstatSync = exports2.lstat = exports2.loadavg = exports2.listenTls = exports2.listen = exports2.linkSync = exports2.link = exports2.kill = exports2.inspect = exports2.hostname = exports2.gid = exports2.ftruncateSync = exports2.ftruncate = exports2.fsyncSync = exports2.fsync = exports2.fstatSync = exports2.fstat = exports2.fdatasyncSync = exports2.fdatasync = exports2.exit = exports2.execPath = exports2.cwd = exports2.createSync = exports2.create = exports2.copyFileSync = exports2.copyFile = exports2.copy = exports2.consoleSize = exports2.connectTls = exports2.connect = exports2.close = exports2.chownSync = exports2.chown = exports2.chmodSync = exports2.chmod = exports2.chdir = exports2.addSignalListener = exports2.isatty = void 0; + exports2.utimeSync = exports2.utime = exports2.futimeSync = exports2.futime = exports2.args = exports2.writeTextFileSync = exports2.writeTextFile = exports2.writeSync = exports2.writeFileSync = exports2.writeFile = exports2.write = exports2.watchFs = exports2.uid = exports2.truncateSync = exports2.truncate = exports2.test = exports2.symlinkSync = exports2.symlink = exports2.statSync = exports2.stat = exports2.shutdown = exports2.run = exports2.Process = exports2.resolveDns = exports2.renameSync = exports2.rename = exports2.removeSync = exports2.removeSignalListener = exports2.remove = exports2.realPathSync = exports2.realPath = exports2.readTextFileSync = exports2.readTextFile = exports2.readSync = exports2.readLinkSync = exports2.readLink = exports2.readFileSync = exports2.readFile = exports2.readDirSync = exports2.readDir = void 0; + var fs_1 = __importDefault(require("fs")); + var errorMap_js_1 = __importDefault(require_errorMap()); + var variables_js_1 = require_variables(); + var tty_1 = require("tty"); + Object.defineProperty(exports2, "isatty", { enumerable: true, get: function() { + return tty_1.isatty; + } }); + var addSignalListener_js_1 = require_addSignalListener(); + Object.defineProperty(exports2, "addSignalListener", { enumerable: true, get: function() { + return addSignalListener_js_1.addSignalListener; + } }); + var chdir_js_1 = require_chdir(); + Object.defineProperty(exports2, "chdir", { enumerable: true, get: function() { + return chdir_js_1.chdir; + } }); + var chmod_js_1 = require_chmod(); + Object.defineProperty(exports2, "chmod", { enumerable: true, get: function() { + return chmod_js_1.chmod; + } }); + var chmodSync_js_1 = require_chmodSync(); + Object.defineProperty(exports2, "chmodSync", { enumerable: true, get: function() { + return chmodSync_js_1.chmodSync; + } }); + var chown_js_1 = require_chown(); + Object.defineProperty(exports2, "chown", { enumerable: true, get: function() { + return chown_js_1.chown; + } }); + var chownSync_js_1 = require_chownSync(); + Object.defineProperty(exports2, "chownSync", { enumerable: true, get: function() { + return chownSync_js_1.chownSync; + } }); + var close_js_1 = require_close(); + Object.defineProperty(exports2, "close", { enumerable: true, get: function() { + return close_js_1.close; + } }); + var connect_js_1 = require_connect2(); + Object.defineProperty(exports2, "connect", { enumerable: true, get: function() { + return connect_js_1.connect; + } }); + var connectTls_js_1 = require_connectTls(); + Object.defineProperty(exports2, "connectTls", { enumerable: true, get: function() { + return connectTls_js_1.connectTls; + } }); + var consoleSize_js_1 = require_consoleSize(); + Object.defineProperty(exports2, "consoleSize", { enumerable: true, get: function() { + return consoleSize_js_1.consoleSize; + } }); + var copy_js_1 = require_copy(); + Object.defineProperty(exports2, "copy", { enumerable: true, get: function() { + return copy_js_1.copy; + } }); + var copyFile_js_1 = require_copyFile(); + Object.defineProperty(exports2, "copyFile", { enumerable: true, get: function() { + return copyFile_js_1.copyFile; + } }); + var copyFileSync_js_1 = require_copyFileSync(); + Object.defineProperty(exports2, "copyFileSync", { enumerable: true, get: function() { + return copyFileSync_js_1.copyFileSync; + } }); + var create_js_1 = require_create(); + Object.defineProperty(exports2, "create", { enumerable: true, get: function() { + return create_js_1.create; + } }); + var createSync_js_1 = require_createSync(); + Object.defineProperty(exports2, "createSync", { enumerable: true, get: function() { + return createSync_js_1.createSync; + } }); + var cwd_js_1 = require_cwd(); + Object.defineProperty(exports2, "cwd", { enumerable: true, get: function() { + return cwd_js_1.cwd; + } }); + var execPath_js_1 = require_execPath(); + Object.defineProperty(exports2, "execPath", { enumerable: true, get: function() { + return execPath_js_1.execPath; + } }); + var exit_js_1 = require_exit(); + Object.defineProperty(exports2, "exit", { enumerable: true, get: function() { + return exit_js_1.exit; + } }); + var fdatasync_js_1 = require_fdatasync(); + Object.defineProperty(exports2, "fdatasync", { enumerable: true, get: function() { + return fdatasync_js_1.fdatasync; + } }); + var fdatasyncSync_js_1 = require_fdatasyncSync(); + Object.defineProperty(exports2, "fdatasyncSync", { enumerable: true, get: function() { + return fdatasyncSync_js_1.fdatasyncSync; + } }); + var fstat_js_1 = require_fstat(); + Object.defineProperty(exports2, "fstat", { enumerable: true, get: function() { + return fstat_js_1.fstat; + } }); + var fstatSync_js_1 = require_fstatSync(); + Object.defineProperty(exports2, "fstatSync", { enumerable: true, get: function() { + return fstatSync_js_1.fstatSync; + } }); + var fsync_js_1 = require_fsync(); + Object.defineProperty(exports2, "fsync", { enumerable: true, get: function() { + return fsync_js_1.fsync; + } }); + var fsyncSync_js_1 = require_fsyncSync(); + Object.defineProperty(exports2, "fsyncSync", { enumerable: true, get: function() { + return fsyncSync_js_1.fsyncSync; + } }); + var ftruncate_js_1 = require_ftruncate(); + Object.defineProperty(exports2, "ftruncate", { enumerable: true, get: function() { + return ftruncate_js_1.ftruncate; + } }); + var ftruncateSync_js_1 = require_ftruncateSync(); + Object.defineProperty(exports2, "ftruncateSync", { enumerable: true, get: function() { + return ftruncateSync_js_1.ftruncateSync; + } }); + var gid_js_1 = require_gid(); + Object.defineProperty(exports2, "gid", { enumerable: true, get: function() { + return gid_js_1.gid; + } }); + var hostname_js_1 = require_hostname(); + Object.defineProperty(exports2, "hostname", { enumerable: true, get: function() { + return hostname_js_1.hostname; + } }); + var inspect_js_1 = require_inspect(); + Object.defineProperty(exports2, "inspect", { enumerable: true, get: function() { + return inspect_js_1.inspect; + } }); + var kill_js_1 = require_kill(); + Object.defineProperty(exports2, "kill", { enumerable: true, get: function() { + return kill_js_1.kill; + } }); + var link_js_1 = require_link(); + Object.defineProperty(exports2, "link", { enumerable: true, get: function() { + return link_js_1.link; + } }); + var linkSync_js_1 = require_linkSync(); + Object.defineProperty(exports2, "linkSync", { enumerable: true, get: function() { + return linkSync_js_1.linkSync; + } }); + var listen_js_1 = require_listen(); + Object.defineProperty(exports2, "listen", { enumerable: true, get: function() { + return listen_js_1.listen; + } }); + var listenTls_js_1 = require_listenTls(); + Object.defineProperty(exports2, "listenTls", { enumerable: true, get: function() { + return listenTls_js_1.listenTls; + } }); + var loadavg_js_1 = require_loadavg(); + Object.defineProperty(exports2, "loadavg", { enumerable: true, get: function() { + return loadavg_js_1.loadavg; + } }); + var lstat_js_1 = require_lstat(); + Object.defineProperty(exports2, "lstat", { enumerable: true, get: function() { + return lstat_js_1.lstat; + } }); + var lstatSync_js_1 = require_lstatSync(); + Object.defineProperty(exports2, "lstatSync", { enumerable: true, get: function() { + return lstatSync_js_1.lstatSync; + } }); + var makeTempDir_js_1 = require_makeTempDir(); + Object.defineProperty(exports2, "makeTempDir", { enumerable: true, get: function() { + return makeTempDir_js_1.makeTempDir; + } }); + var makeTempDirSync_js_1 = require_makeTempDirSync(); + Object.defineProperty(exports2, "makeTempDirSync", { enumerable: true, get: function() { + return makeTempDirSync_js_1.makeTempDirSync; + } }); + var makeTempFile_js_1 = require_makeTempFile(); + Object.defineProperty(exports2, "makeTempFile", { enumerable: true, get: function() { + return makeTempFile_js_1.makeTempFile; + } }); + var makeTempFileSync_js_1 = require_makeTempFileSync(); + Object.defineProperty(exports2, "makeTempFileSync", { enumerable: true, get: function() { + return makeTempFileSync_js_1.makeTempFileSync; + } }); + var memoryUsage_js_1 = require_memoryUsage(); + Object.defineProperty(exports2, "memoryUsage", { enumerable: true, get: function() { + return memoryUsage_js_1.memoryUsage; + } }); + var mkdir_js_1 = require_mkdir(); + Object.defineProperty(exports2, "mkdir", { enumerable: true, get: function() { + return mkdir_js_1.mkdir; + } }); + var mkdirSync_js_1 = require_mkdirSync(); + Object.defineProperty(exports2, "mkdirSync", { enumerable: true, get: function() { + return mkdirSync_js_1.mkdirSync; + } }); + var open_js_1 = require_open(); + Object.defineProperty(exports2, "open", { enumerable: true, get: function() { + return open_js_1.open; + } }); + var openSync_js_1 = require_openSync(); + Object.defineProperty(exports2, "openSync", { enumerable: true, get: function() { + return openSync_js_1.openSync; + } }); + var osRelease_js_1 = require_osRelease(); + Object.defineProperty(exports2, "osRelease", { enumerable: true, get: function() { + return osRelease_js_1.osRelease; + } }); + var osUptime_js_1 = require_osUptime(); + Object.defineProperty(exports2, "osUptime", { enumerable: true, get: function() { + return osUptime_js_1.osUptime; + } }); + var read_js_1 = require_read(); + Object.defineProperty(exports2, "read", { enumerable: true, get: function() { + return read_js_1.read; + } }); + var readDir_js_1 = require_readDir(); + Object.defineProperty(exports2, "readDir", { enumerable: true, get: function() { + return readDir_js_1.readDir; + } }); + var readDirSync_js_1 = require_readDirSync(); + Object.defineProperty(exports2, "readDirSync", { enumerable: true, get: function() { + return readDirSync_js_1.readDirSync; + } }); + var readFile_js_1 = require_readFile(); + Object.defineProperty(exports2, "readFile", { enumerable: true, get: function() { + return readFile_js_1.readFile; + } }); + var readFileSync_js_1 = require_readFileSync(); + Object.defineProperty(exports2, "readFileSync", { enumerable: true, get: function() { + return readFileSync_js_1.readFileSync; + } }); + var readLink_js_1 = require_readLink(); + Object.defineProperty(exports2, "readLink", { enumerable: true, get: function() { + return readLink_js_1.readLink; + } }); + var readLinkSync_js_1 = require_readLinkSync(); + Object.defineProperty(exports2, "readLinkSync", { enumerable: true, get: function() { + return readLinkSync_js_1.readLinkSync; + } }); + var readSync_js_1 = require_readSync(); + Object.defineProperty(exports2, "readSync", { enumerable: true, get: function() { + return readSync_js_1.readSync; + } }); + var readTextFile_js_1 = require_readTextFile(); + Object.defineProperty(exports2, "readTextFile", { enumerable: true, get: function() { + return readTextFile_js_1.readTextFile; + } }); + var readTextFileSync_js_1 = require_readTextFileSync(); + Object.defineProperty(exports2, "readTextFileSync", { enumerable: true, get: function() { + return readTextFileSync_js_1.readTextFileSync; + } }); + var realPath_js_1 = require_realPath(); + Object.defineProperty(exports2, "realPath", { enumerable: true, get: function() { + return realPath_js_1.realPath; + } }); + var realPathSync_js_1 = require_realPathSync(); + Object.defineProperty(exports2, "realPathSync", { enumerable: true, get: function() { + return realPathSync_js_1.realPathSync; + } }); + var remove_js_1 = require_remove2(); + Object.defineProperty(exports2, "remove", { enumerable: true, get: function() { + return remove_js_1.remove; + } }); + var removeSignalListener_js_1 = require_removeSignalListener(); + Object.defineProperty(exports2, "removeSignalListener", { enumerable: true, get: function() { + return removeSignalListener_js_1.removeSignalListener; + } }); + var removeSync_js_1 = require_removeSync(); + Object.defineProperty(exports2, "removeSync", { enumerable: true, get: function() { + return removeSync_js_1.removeSync; + } }); + var rename_js_1 = require_rename(); + Object.defineProperty(exports2, "rename", { enumerable: true, get: function() { + return rename_js_1.rename; + } }); + var renameSync_js_1 = require_renameSync(); + Object.defineProperty(exports2, "renameSync", { enumerable: true, get: function() { + return renameSync_js_1.renameSync; + } }); + var resolveDns_js_1 = require_resolveDns(); + Object.defineProperty(exports2, "resolveDns", { enumerable: true, get: function() { + return resolveDns_js_1.resolveDns; + } }); + var run_js_1 = require_run(); + Object.defineProperty(exports2, "Process", { enumerable: true, get: function() { + return run_js_1.Process; + } }); + Object.defineProperty(exports2, "run", { enumerable: true, get: function() { + return run_js_1.run; + } }); + var shutdown_js_1 = require_shutdown(); + Object.defineProperty(exports2, "shutdown", { enumerable: true, get: function() { + return shutdown_js_1.shutdown; + } }); + var stat_js_1 = require_stat(); + Object.defineProperty(exports2, "stat", { enumerable: true, get: function() { + return stat_js_1.stat; + } }); + var statSync_js_1 = require_statSync(); + Object.defineProperty(exports2, "statSync", { enumerable: true, get: function() { + return statSync_js_1.statSync; + } }); + var symlink_js_1 = require_symlink(); + Object.defineProperty(exports2, "symlink", { enumerable: true, get: function() { + return symlink_js_1.symlink; + } }); + var symlinkSync_js_1 = require_symlinkSync(); + Object.defineProperty(exports2, "symlinkSync", { enumerable: true, get: function() { + return symlinkSync_js_1.symlinkSync; + } }); + var test_js_1 = require_test2(); + Object.defineProperty(exports2, "test", { enumerable: true, get: function() { + return test_js_1.test; + } }); + var truncate_js_1 = require_truncate(); + Object.defineProperty(exports2, "truncate", { enumerable: true, get: function() { + return truncate_js_1.truncate; + } }); + var truncateSync_js_1 = require_truncateSync(); + Object.defineProperty(exports2, "truncateSync", { enumerable: true, get: function() { + return truncateSync_js_1.truncateSync; + } }); + var uid_js_1 = require_uid(); + Object.defineProperty(exports2, "uid", { enumerable: true, get: function() { + return uid_js_1.uid; + } }); + var watchFs_js_1 = require_watchFs(); + Object.defineProperty(exports2, "watchFs", { enumerable: true, get: function() { + return watchFs_js_1.watchFs; + } }); + var write_js_1 = require_write(); + Object.defineProperty(exports2, "write", { enumerable: true, get: function() { + return write_js_1.write; + } }); + var writeFile_js_1 = require_writeFile(); + Object.defineProperty(exports2, "writeFile", { enumerable: true, get: function() { + return writeFile_js_1.writeFile; + } }); + var writeFileSync_js_1 = require_writeFileSync(); + Object.defineProperty(exports2, "writeFileSync", { enumerable: true, get: function() { + return writeFileSync_js_1.writeFileSync; + } }); + var writeSync_js_1 = require_writeSync(); + Object.defineProperty(exports2, "writeSync", { enumerable: true, get: function() { + return writeSync_js_1.writeSync; + } }); + var writeTextFile_js_1 = require_writeTextFile(); + Object.defineProperty(exports2, "writeTextFile", { enumerable: true, get: function() { + return writeTextFile_js_1.writeTextFile; + } }); + var writeTextFileSync_js_1 = require_writeTextFileSync(); + Object.defineProperty(exports2, "writeTextFileSync", { enumerable: true, get: function() { + return writeTextFileSync_js_1.writeTextFileSync; + } }); + var args_js_1 = require_args(); + Object.defineProperty(exports2, "args", { enumerable: true, get: function() { + return args_js_1.args; + } }); + var futime = async function(rid, atime, mtime) { + try { + await new Promise((resolve, reject) => { + fs_1.default.futimes(rid, atime, mtime, (err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }); + }); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.futime = futime; + var futimeSync = function(rid, atime, mtime) { + try { + fs_1.default.futimesSync(rid, atime, mtime); + } catch (error) { + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.futimeSync = futimeSync; + var utime = async function(path, atime, mtime) { + try { + await fs_1.default.promises.utimes(path, atime, mtime); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.utime = utime; + var utimeSync = function(path, atime, mtime) { + try { + fs_1.default.utimesSync(path, atime, mtime); + } catch (error) { + if ((error === null || error === void 0 ? void 0 : error.code) === "ENOENT") { + throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`); + } + throw (0, errorMap_js_1.default)(error); + } + }; + exports2.utimeSync = utimeSync; + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/types.js +var require_types = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno/stable/main.js +var require_main2 = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno/stable/main.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_classes(), exports2); + __exportStar(require_enums(), exports2); + __exportStar(require_functions(), exports2); + __exportStar(require_types(), exports2); + __exportStar(require_variables(), exports2); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/deno.js +var require_deno = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/deno.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __exportStar = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar(require_main2(), exports2); + } +}); + +// npm/node_modules/@deno/shim-deno/dist/index.js +var require_dist2 = __commonJS({ + "npm/node_modules/@deno/shim-deno/dist/index.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + } : function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + }); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + } : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Deno = void 0; + exports2.Deno = __importStar(require_deno()); + } +}); + +// npm/node_modules/bottleneck/light.js +var require_light = __commonJS({ + "npm/node_modules/bottleneck/light.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.Bottleneck = factory(); + })(exports2, function() { + "use strict"; + var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; + function getCjsExportFromNamespace(n) { + return n && n["default"] || n; + } + var load2 = function(received, defaults, onto = {}) { + var k, ref, v; + for (k in defaults) { + v = defaults[k]; + onto[k] = (ref = received[k]) != null ? ref : v; + } + return onto; + }; + var overwrite = function(received, defaults, onto = {}) { + var k, v; + for (k in received) { + v = received[k]; + if (defaults[k] !== void 0) { + onto[k] = v; + } + } + return onto; + }; + var parser = { + load: load2, + overwrite + }; + var DLList; + DLList = class DLList { + constructor(incr, decr) { + this.incr = incr; + this.decr = decr; + this._first = null; + this._last = null; + this.length = 0; + } + push(value) { + var node; + this.length++; + if (typeof this.incr === "function") { + this.incr(); + } + node = { + value, + prev: this._last, + next: null + }; + if (this._last != null) { + this._last.next = node; + this._last = node; + } else { + this._first = this._last = node; + } + return void 0; + } + shift() { + var value; + if (this._first == null) { + return; + } else { + this.length--; + if (typeof this.decr === "function") { + this.decr(); + } + } + value = this._first.value; + if ((this._first = this._first.next) != null) { + this._first.prev = null; + } else { + this._last = null; + } + return value; + } + first() { + if (this._first != null) { + return this._first.value; + } + } + getArray() { + var node, ref, results; + node = this._first; + results = []; + while (node != null) { + results.push((ref = node, node = node.next, ref.value)); + } + return results; + } + forEachShift(cb) { + var node; + node = this.shift(); + while (node != null) { + cb(node), node = this.shift(); + } + return void 0; + } + debug() { + var node, ref, ref1, ref2, results; + node = this._first; + results = []; + while (node != null) { + results.push((ref = node, node = node.next, { + value: ref.value, + prev: (ref1 = ref.prev) != null ? ref1.value : void 0, + next: (ref2 = ref.next) != null ? ref2.value : void 0 + })); + } + return results; + } + }; + var DLList_1 = DLList; + var Events; + Events = class Events { + constructor(instance) { + this.instance = instance; + this._events = {}; + if (this.instance.on != null || this.instance.once != null || this.instance.removeAllListeners != null) { + throw new Error("An Emitter already exists for this object"); + } + this.instance.on = (name, cb) => { + return this._addListener(name, "many", cb); + }; + this.instance.once = (name, cb) => { + return this._addListener(name, "once", cb); + }; + this.instance.removeAllListeners = (name = null) => { + if (name != null) { + return delete this._events[name]; + } else { + return this._events = {}; + } + }; + } + _addListener(name, status, cb) { + var base; + if ((base = this._events)[name] == null) { + base[name] = []; + } + this._events[name].push({ cb, status }); + return this.instance; + } + listenerCount(name) { + if (this._events[name] != null) { + return this._events[name].length; + } else { + return 0; + } + } + async trigger(name, ...args) { + var e, promises; + try { + if (name !== "debug") { + this.trigger("debug", `Event triggered: ${name}`, args); + } + if (this._events[name] == null) { + return; + } + this._events[name] = this._events[name].filter(function(listener) { + return listener.status !== "none"; + }); + promises = this._events[name].map(async (listener) => { + var e2, returned; + if (listener.status === "none") { + return; + } + if (listener.status === "once") { + listener.status = "none"; + } + try { + returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; + if (typeof (returned != null ? returned.then : void 0) === "function") { + return await returned; + } else { + return returned; + } + } catch (error) { + e2 = error; + { + this.trigger("error", e2); + } + return null; + } + }); + return (await Promise.all(promises)).find(function(x) { + return x != null; + }); + } catch (error) { + e = error; + { + this.trigger("error", e); + } + return null; + } + } + }; + var Events_1 = Events; + var DLList$1, Events$1, Queues; + DLList$1 = DLList_1; + Events$1 = Events_1; + Queues = class Queues { + constructor(num_priorities) { + var i; + this.Events = new Events$1(this); + this._length = 0; + this._lists = function() { + var j, ref, results; + results = []; + for (i = j = 1, ref = num_priorities; 1 <= ref ? j <= ref : j >= ref; i = 1 <= ref ? ++j : --j) { + results.push(new DLList$1(() => { + return this.incr(); + }, () => { + return this.decr(); + })); + } + return results; + }.call(this); + } + incr() { + if (this._length++ === 0) { + return this.Events.trigger("leftzero"); + } + } + decr() { + if (--this._length === 0) { + return this.Events.trigger("zero"); + } + } + push(job) { + return this._lists[job.options.priority].push(job); + } + queued(priority) { + if (priority != null) { + return this._lists[priority].length; + } else { + return this._length; + } + } + shiftAll(fn) { + return this._lists.forEach(function(list) { + return list.forEachShift(fn); + }); + } + getFirst(arr = this._lists) { + var j, len, list; + for (j = 0, len = arr.length; j < len; j++) { + list = arr[j]; + if (list.length > 0) { + return list; + } + } + return []; + } + shiftLastFrom(priority) { + return this.getFirst(this._lists.slice(priority).reverse()).shift(); + } + }; + var Queues_1 = Queues; + var BottleneckError; + BottleneckError = class BottleneckError extends Error { + }; + var BottleneckError_1 = BottleneckError; + var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; + NUM_PRIORITIES = 10; + DEFAULT_PRIORITY = 5; + parser$1 = parser; + BottleneckError$1 = BottleneckError_1; + Job = class Job { + constructor(task, args, options, jobDefaults, rejectOnDrop, Events2, _states, Promise2) { + this.task = task; + this.args = args; + this.rejectOnDrop = rejectOnDrop; + this.Events = Events2; + this._states = _states; + this.Promise = Promise2; + this.options = parser$1.load(options, jobDefaults); + this.options.priority = this._sanitizePriority(this.options.priority); + if (this.options.id === jobDefaults.id) { + this.options.id = `${this.options.id}-${this._randomIndex()}`; + } + this.promise = new this.Promise((_resolve, _reject) => { + this._resolve = _resolve; + this._reject = _reject; + }); + this.retryCount = 0; + } + _sanitizePriority(priority) { + var sProperty; + sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; + if (sProperty < 0) { + return 0; + } else if (sProperty > NUM_PRIORITIES - 1) { + return NUM_PRIORITIES - 1; + } else { + return sProperty; + } + } + _randomIndex() { + return Math.random().toString(36).slice(2); + } + doDrop({ error, message: message2 = "This job has been dropped by Bottleneck" } = {}) { + if (this._states.remove(this.options.id)) { + if (this.rejectOnDrop) { + this._reject(error != null ? error : new BottleneckError$1(message2)); + } + this.Events.trigger("dropped", { args: this.args, options: this.options, task: this.task, promise: this.promise }); + return true; + } else { + return false; + } + } + _assertStatus(expected) { + var status; + status = this._states.jobStatus(this.options.id); + if (!(status === expected || expected === "DONE" && status === null)) { + throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); + } + } + doReceive() { + this._states.start(this.options.id); + return this.Events.trigger("received", { args: this.args, options: this.options }); + } + doQueue(reachedHWM, blocked) { + this._assertStatus("RECEIVED"); + this._states.next(this.options.id); + return this.Events.trigger("queued", { args: this.args, options: this.options, reachedHWM, blocked }); + } + doRun() { + if (this.retryCount === 0) { + this._assertStatus("QUEUED"); + this._states.next(this.options.id); + } else { + this._assertStatus("EXECUTING"); + } + return this.Events.trigger("scheduled", { args: this.args, options: this.options }); + } + async doExecute(chained, clearGlobalState, run, free) { + var error, eventInfo, passed; + if (this.retryCount === 0) { + this._assertStatus("RUNNING"); + this._states.next(this.options.id); + } else { + this._assertStatus("EXECUTING"); + } + eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; + this.Events.trigger("executing", eventInfo); + try { + passed = await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args)); + if (clearGlobalState()) { + this.doDone(eventInfo); + await free(this.options, eventInfo); + this._assertStatus("DONE"); + return this._resolve(passed); + } + } catch (error1) { + error = error1; + return this._onFailure(error, eventInfo, clearGlobalState, run, free); + } + } + doExpire(clearGlobalState, run, free) { + var error, eventInfo; + if (this._states.jobStatus(this.options.id === "RUNNING")) { + this._states.next(this.options.id); + } + this._assertStatus("EXECUTING"); + eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; + error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error, eventInfo, clearGlobalState, run, free); + } + async _onFailure(error, eventInfo, clearGlobalState, run, free) { + var retry2, retryAfter; + if (clearGlobalState()) { + retry2 = await this.Events.trigger("failed", error, eventInfo); + if (retry2 != null) { + retryAfter = ~~retry2; + this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); + this.retryCount++; + return run(retryAfter); + } else { + this.doDone(eventInfo); + await free(this.options, eventInfo); + this._assertStatus("DONE"); + return this._reject(error); + } + } + } + doDone(eventInfo) { + this._assertStatus("EXECUTING"); + this._states.next(this.options.id); + return this.Events.trigger("done", eventInfo); + } + }; + var Job_1 = Job; + var BottleneckError$2, LocalDatastore, parser$2; + parser$2 = parser; + BottleneckError$2 = BottleneckError_1; + LocalDatastore = class LocalDatastore { + constructor(instance, storeOptions, storeInstanceOptions) { + this.instance = instance; + this.storeOptions = storeOptions; + this.clientId = this.instance._randomIndex(); + parser$2.load(storeInstanceOptions, storeInstanceOptions, this); + this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); + this._running = 0; + this._done = 0; + this._unblockTime = 0; + this.ready = this.Promise.resolve(); + this.clients = {}; + this._startHeartbeat(); + } + _startHeartbeat() { + var base; + if (this.heartbeat == null && (this.storeOptions.reservoirRefreshInterval != null && this.storeOptions.reservoirRefreshAmount != null || this.storeOptions.reservoirIncreaseInterval != null && this.storeOptions.reservoirIncreaseAmount != null)) { + return typeof (base = this.heartbeat = setInterval(() => { + var amount, incr, maximum, now, reservoir; + now = Date.now(); + if (this.storeOptions.reservoirRefreshInterval != null && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { + this._lastReservoirRefresh = now; + this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; + this.instance._drainAll(this.computeCapacity()); + } + if (this.storeOptions.reservoirIncreaseInterval != null && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { + ({ + reservoirIncreaseAmount: amount, + reservoirIncreaseMaximum: maximum, + reservoir + } = this.storeOptions); + this._lastReservoirIncrease = now; + incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; + if (incr > 0) { + this.storeOptions.reservoir += incr; + return this.instance._drainAll(this.computeCapacity()); + } + } + }, this.heartbeatInterval)).unref === "function" ? base.unref() : void 0; + } else { + return clearInterval(this.heartbeat); + } + } + async __publish__(message2) { + await this.yieldLoop(); + return this.instance.Events.trigger("message", message2.toString()); + } + async __disconnect__(flush) { + await this.yieldLoop(); + clearInterval(this.heartbeat); + return this.Promise.resolve(); + } + yieldLoop(t = 0) { + return new this.Promise(function(resolve, reject) { + return setTimeout(resolve, t); + }); + } + computePenalty() { + var ref; + return (ref = this.storeOptions.penalty) != null ? ref : 15 * this.storeOptions.minTime || 5e3; + } + async __updateSettings__(options) { + await this.yieldLoop(); + parser$2.overwrite(options, options, this.storeOptions); + this._startHeartbeat(); + this.instance._drainAll(this.computeCapacity()); + return true; + } + async __running__() { + await this.yieldLoop(); + return this._running; + } + async __queued__() { + await this.yieldLoop(); + return this.instance.queued(); + } + async __done__() { + await this.yieldLoop(); + return this._done; + } + async __groupCheck__(time) { + await this.yieldLoop(); + return this._nextRequest + this.timeout < time; + } + computeCapacity() { + var maxConcurrent, reservoir; + ({ maxConcurrent, reservoir } = this.storeOptions); + if (maxConcurrent != null && reservoir != null) { + return Math.min(maxConcurrent - this._running, reservoir); + } else if (maxConcurrent != null) { + return maxConcurrent - this._running; + } else if (reservoir != null) { + return reservoir; + } else { + return null; + } + } + conditionsCheck(weight) { + var capacity; + capacity = this.computeCapacity(); + return capacity == null || weight <= capacity; + } + async __incrementReservoir__(incr) { + var reservoir; + await this.yieldLoop(); + reservoir = this.storeOptions.reservoir += incr; + this.instance._drainAll(this.computeCapacity()); + return reservoir; + } + async __currentReservoir__() { + await this.yieldLoop(); + return this.storeOptions.reservoir; + } + isBlocked(now) { + return this._unblockTime >= now; + } + check(weight, now) { + return this.conditionsCheck(weight) && this._nextRequest - now <= 0; + } + async __check__(weight) { + var now; + await this.yieldLoop(); + now = Date.now(); + return this.check(weight, now); + } + async __register__(index, weight, expiration) { + var now, wait; + await this.yieldLoop(); + now = Date.now(); + if (this.conditionsCheck(weight)) { + this._running += weight; + if (this.storeOptions.reservoir != null) { + this.storeOptions.reservoir -= weight; + } + wait = Math.max(this._nextRequest - now, 0); + this._nextRequest = now + wait + this.storeOptions.minTime; + return { + success: true, + wait, + reservoir: this.storeOptions.reservoir + }; + } else { + return { + success: false + }; + } + } + strategyIsBlock() { + return this.storeOptions.strategy === 3; + } + async __submit__(queueLength, weight) { + var blocked, now, reachedHWM; + await this.yieldLoop(); + if (this.storeOptions.maxConcurrent != null && weight > this.storeOptions.maxConcurrent) { + throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`); + } + now = Date.now(); + reachedHWM = this.storeOptions.highWater != null && queueLength === this.storeOptions.highWater && !this.check(weight, now); + blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); + if (blocked) { + this._unblockTime = now + this.computePenalty(); + this._nextRequest = this._unblockTime + this.storeOptions.minTime; + this.instance._dropAllQueued(); + } + return { + reachedHWM, + blocked, + strategy: this.storeOptions.strategy + }; + } + async __free__(index, weight) { + await this.yieldLoop(); + this._running -= weight; + this._done += weight; + this.instance._drainAll(this.computeCapacity()); + return { + running: this._running + }; + } + }; + var LocalDatastore_1 = LocalDatastore; + var BottleneckError$3, States; + BottleneckError$3 = BottleneckError_1; + States = class States { + constructor(status1) { + this.status = status1; + this._jobs = {}; + this.counts = this.status.map(function() { + return 0; + }); + } + next(id) { + var current, next; + current = this._jobs[id]; + next = current + 1; + if (current != null && next < this.status.length) { + this.counts[current]--; + this.counts[next]++; + return this._jobs[id]++; + } else if (current != null) { + this.counts[current]--; + return delete this._jobs[id]; + } + } + start(id) { + var initial; + initial = 0; + this._jobs[id] = initial; + return this.counts[initial]++; + } + remove(id) { + var current; + current = this._jobs[id]; + if (current != null) { + this.counts[current]--; + delete this._jobs[id]; + } + return current != null; + } + jobStatus(id) { + var ref; + return (ref = this.status[this._jobs[id]]) != null ? ref : null; + } + statusJobs(status) { + var k, pos, ref, results, v; + if (status != null) { + pos = this.status.indexOf(status); + if (pos < 0) { + throw new BottleneckError$3(`status must be one of ${this.status.join(", ")}`); + } + ref = this._jobs; + results = []; + for (k in ref) { + v = ref[k]; + if (v === pos) { + results.push(k); + } + } + return results; + } else { + return Object.keys(this._jobs); + } + } + statusCounts() { + return this.counts.reduce((acc, v, i) => { + acc[this.status[i]] = v; + return acc; + }, {}); + } + }; + var States_1 = States; + var DLList$2, Sync; + DLList$2 = DLList_1; + Sync = class Sync { + constructor(name, Promise2) { + this.schedule = this.schedule.bind(this); + this.name = name; + this.Promise = Promise2; + this._running = 0; + this._queue = new DLList$2(); + } + isEmpty() { + return this._queue.length === 0; + } + async _tryToRun() { + var args, cb, error, reject, resolve, returned, task; + if (this._running < 1 && this._queue.length > 0) { + this._running++; + ({ task, args, resolve, reject } = this._queue.shift()); + cb = await async function() { + try { + returned = await task(...args); + return function() { + return resolve(returned); + }; + } catch (error1) { + error = error1; + return function() { + return reject(error); + }; + } + }(); + this._running--; + this._tryToRun(); + return cb(); + } + } + schedule(task, ...args) { + var promise, reject, resolve; + resolve = reject = null; + promise = new this.Promise(function(_resolve, _reject) { + resolve = _resolve; + return reject = _reject; + }); + this._queue.push({ task, args, resolve, reject }); + this._tryToRun(); + return promise; + } + }; + var Sync_1 = Sync; + var version2 = "2.19.5"; + var version$1 = { + version: version2 + }; + var version$2 = /* @__PURE__ */ Object.freeze({ + version: version2, + default: version$1 + }); + var require$$2 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$3 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$4 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; + parser$3 = parser; + Events$2 = Events_1; + RedisConnection$1 = require$$2; + IORedisConnection$1 = require$$3; + Scripts$1 = require$$4; + Group = function() { + class Group2 { + constructor(limiterOptions = {}) { + this.deleteKey = this.deleteKey.bind(this); + this.limiterOptions = limiterOptions; + parser$3.load(this.limiterOptions, this.defaults, this); + this.Events = new Events$2(this); + this.instances = {}; + this.Bottleneck = Bottleneck_1; + this._startAutoCleanup(); + this.sharedConnection = this.connection != null; + if (this.connection == null) { + if (this.limiterOptions.datastore === "redis") { + this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, { Events: this.Events })); + } else if (this.limiterOptions.datastore === "ioredis") { + this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, { Events: this.Events })); + } + } + } + key(key = "") { + var ref; + return (ref = this.instances[key]) != null ? ref : (() => { + var limiter; + limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { + id: `${this.id}-${key}`, + timeout: this.timeout, + connection: this.connection + })); + this.Events.trigger("created", limiter, key); + return limiter; + })(); + } + async deleteKey(key = "") { + var deleted, instance; + instance = this.instances[key]; + if (this.connection) { + deleted = await this.connection.__runCommand__(["del", ...Scripts$1.allKeys(`${this.id}-${key}`)]); + } + if (instance != null) { + delete this.instances[key]; + await instance.disconnect(); + } + return instance != null || deleted > 0; + } + limiters() { + var k, ref, results, v; + ref = this.instances; + results = []; + for (k in ref) { + v = ref[k]; + results.push({ + key: k, + limiter: v + }); + } + return results; + } + keys() { + return Object.keys(this.instances); + } + async clusterKeys() { + var cursor, end, found, i, k, keys, len, next, start; + if (this.connection == null) { + return this.Promise.resolve(this.keys()); + } + keys = []; + cursor = null; + start = `b_${this.id}-`.length; + end = "_settings".length; + while (cursor !== 0) { + [next, found] = await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 1e4]); + cursor = ~~next; + for (i = 0, len = found.length; i < len; i++) { + k = found[i]; + keys.push(k.slice(start, -end)); + } + } + return keys; + } + _startAutoCleanup() { + var base; + clearInterval(this.interval); + return typeof (base = this.interval = setInterval(async () => { + var e, k, ref, results, time, v; + time = Date.now(); + ref = this.instances; + results = []; + for (k in ref) { + v = ref[k]; + try { + if (await v._store.__groupCheck__(time)) { + results.push(this.deleteKey(k)); + } else { + results.push(void 0); + } + } catch (error) { + e = error; + results.push(v.Events.trigger("error", e)); + } + } + return results; + }, this.timeout / 2)).unref === "function" ? base.unref() : void 0; + } + updateSettings(options = {}) { + parser$3.overwrite(options, this.defaults, this); + parser$3.overwrite(options, options, this.limiterOptions); + if (options.timeout != null) { + return this._startAutoCleanup(); + } + } + disconnect(flush = true) { + var ref; + if (!this.sharedConnection) { + return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; + } + } + } + Group2.prototype.defaults = { + timeout: 1e3 * 60 * 5, + connection: null, + Promise, + id: "group-key" + }; + return Group2; + }.call(commonjsGlobal); + var Group_1 = Group; + var Batcher, Events$3, parser$4; + parser$4 = parser; + Events$3 = Events_1; + Batcher = function() { + class Batcher2 { + constructor(options = {}) { + this.options = options; + parser$4.load(this.options, this.defaults, this); + this.Events = new Events$3(this); + this._arr = []; + this._resetPromise(); + this._lastFlush = Date.now(); + } + _resetPromise() { + return this._promise = new this.Promise((res, rej) => { + return this._resolve = res; + }); + } + _flush() { + clearTimeout(this._timeout); + this._lastFlush = Date.now(); + this._resolve(); + this.Events.trigger("batch", this._arr); + this._arr = []; + return this._resetPromise(); + } + add(data) { + var ret; + this._arr.push(data); + ret = this._promise; + if (this._arr.length === this.maxSize) { + this._flush(); + } else if (this.maxTime != null && this._arr.length === 1) { + this._timeout = setTimeout(() => { + return this._flush(); + }, this.maxTime); + } + return ret; + } + } + Batcher2.prototype.defaults = { + maxTime: null, + maxSize: null, + Promise + }; + return Batcher2; + }.call(commonjsGlobal); + var Batcher_1 = Batcher; + var require$$4$1 = () => console.log("You must import the full version of Bottleneck in order to use this feature."); + var require$$8 = getCjsExportFromNamespace(version$2); + var Bottleneck2, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, splice = [].splice; + NUM_PRIORITIES$1 = 10; + DEFAULT_PRIORITY$1 = 5; + parser$5 = parser; + Queues$1 = Queues_1; + Job$1 = Job_1; + LocalDatastore$1 = LocalDatastore_1; + RedisDatastore$1 = require$$4$1; + Events$4 = Events_1; + States$1 = States_1; + Sync$1 = Sync_1; + Bottleneck2 = function() { + class Bottleneck3 { + constructor(options = {}, ...invalid) { + var storeInstanceOptions, storeOptions; + this._addToQueue = this._addToQueue.bind(this); + this._validateOptions(options, invalid); + parser$5.load(options, this.instanceDefaults, this); + this._queues = new Queues$1(NUM_PRIORITIES$1); + this._scheduled = {}; + this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); + this._limiter = null; + this.Events = new Events$4(this); + this._submitLock = new Sync$1("submit", this.Promise); + this._registerLock = new Sync$1("register", this.Promise); + storeOptions = parser$5.load(options, this.storeDefaults, {}); + this._store = function() { + if (this.datastore === "redis" || this.datastore === "ioredis" || this.connection != null) { + storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {}); + return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); + } else if (this.datastore === "local") { + storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {}); + return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); + } else { + throw new Bottleneck3.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); + } + }.call(this); + this._queues.on("leftzero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; + }); + this._queues.on("zero", () => { + var ref; + return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; + }); + } + _validateOptions(options, invalid) { + if (!(options != null && typeof options === "object" && invalid.length === 0)) { + throw new Bottleneck3.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); + } + } + ready() { + return this._store.ready; + } + clients() { + return this._store.clients; + } + channel() { + return `b_${this.id}`; + } + channel_client() { + return `b_${this.id}_${this._store.clientId}`; + } + publish(message2) { + return this._store.__publish__(message2); + } + disconnect(flush = true) { + return this._store.__disconnect__(flush); + } + chain(_limiter) { + this._limiter = _limiter; + return this; + } + queued(priority) { + return this._queues.queued(priority); + } + clusterQueued() { + return this._store.__queued__(); + } + empty() { + return this.queued() === 0 && this._submitLock.isEmpty(); + } + running() { + return this._store.__running__(); + } + done() { + return this._store.__done__(); + } + jobStatus(id) { + return this._states.jobStatus(id); + } + jobs(status) { + return this._states.statusJobs(status); + } + counts() { + return this._states.statusCounts(); + } + _randomIndex() { + return Math.random().toString(36).slice(2); + } + check(weight = 1) { + return this._store.__check__(weight); + } + _clearGlobalState(index) { + if (this._scheduled[index] != null) { + clearTimeout(this._scheduled[index].expiration); + delete this._scheduled[index]; + return true; + } else { + return false; + } + } + async _free(index, job, options, eventInfo) { + var e, running; + try { + ({ running } = await this._store.__free__(index, options.weight)); + this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); + if (running === 0 && this.empty()) { + return this.Events.trigger("idle"); + } + } catch (error1) { + e = error1; + return this.Events.trigger("error", e); + } + } + _run(index, job, wait) { + var clearGlobalState, free, run; + job.doRun(); + clearGlobalState = this._clearGlobalState.bind(this, index); + run = this._run.bind(this, index, job); + free = this._free.bind(this, index, job); + return this._scheduled[index] = { + timeout: setTimeout(() => { + return job.doExecute(this._limiter, clearGlobalState, run, free); + }, wait), + expiration: job.options.expiration != null ? setTimeout(function() { + return job.doExpire(clearGlobalState, run, free); + }, wait + job.options.expiration) : void 0, + job + }; + } + _drainOne(capacity) { + return this._registerLock.schedule(() => { + var args, index, next, options, queue; + if (this.queued() === 0) { + return this.Promise.resolve(null); + } + queue = this._queues.getFirst(); + ({ options, args } = next = queue.first()); + if (capacity != null && options.weight > capacity) { + return this.Promise.resolve(null); + } + this.Events.trigger("debug", `Draining ${options.id}`, { args, options }); + index = this._randomIndex(); + return this._store.__register__(index, options.weight, options.expiration).then(({ success, wait, reservoir }) => { + var empty; + this.Events.trigger("debug", `Drained ${options.id}`, { success, args, options }); + if (success) { + queue.shift(); + empty = this.empty(); + if (empty) { + this.Events.trigger("empty"); + } + if (reservoir === 0) { + this.Events.trigger("depleted", empty); + } + this._run(index, next, wait); + return this.Promise.resolve(options.weight); + } else { + return this.Promise.resolve(null); + } + }); + }); + } + _drainAll(capacity, total = 0) { + return this._drainOne(capacity).then((drained) => { + var newCapacity; + if (drained != null) { + newCapacity = capacity != null ? capacity - drained : capacity; + return this._drainAll(newCapacity, total + drained); + } else { + return this.Promise.resolve(total); + } + }).catch((e) => { + return this.Events.trigger("error", e); + }); + } + _dropAllQueued(message2) { + return this._queues.shiftAll(function(job) { + return job.doDrop({ message: message2 }); + }); + } + stop(options = {}) { + var done, waitForExecuting; + options = parser$5.load(options, this.stopDefaults); + waitForExecuting = (at) => { + var finished; + finished = () => { + var counts; + counts = this._states.counts; + return counts[0] + counts[1] + counts[2] + counts[3] === at; + }; + return new this.Promise((resolve, reject) => { + if (finished()) { + return resolve(); + } else { + return this.on("done", () => { + if (finished()) { + this.removeAllListeners("done"); + return resolve(); + } + }); + } + }); + }; + done = options.dropWaitingJobs ? (this._run = function(index, next) { + return next.doDrop({ + message: options.dropErrorMessage + }); + }, this._drainOne = () => { + return this.Promise.resolve(null); + }, this._registerLock.schedule(() => { + return this._submitLock.schedule(() => { + var k, ref, v; + ref = this._scheduled; + for (k in ref) { + v = ref[k]; + if (this.jobStatus(v.job.options.id) === "RUNNING") { + clearTimeout(v.timeout); + clearTimeout(v.expiration); + v.job.doDrop({ + message: options.dropErrorMessage + }); + } + } + this._dropAllQueued(options.dropErrorMessage); + return waitForExecuting(0); + }); + })) : this.schedule({ + priority: NUM_PRIORITIES$1 - 1, + weight: 0 + }, () => { + return waitForExecuting(1); + }); + this._receive = function(job) { + return job._reject(new Bottleneck3.prototype.BottleneckError(options.enqueueErrorMessage)); + }; + this.stop = () => { + return this.Promise.reject(new Bottleneck3.prototype.BottleneckError("stop() has already been called")); + }; + return done; + } + async _addToQueue(job) { + var args, blocked, error, options, reachedHWM, shifted, strategy; + ({ args, options } = job); + try { + ({ reachedHWM, blocked, strategy } = await this._store.__submit__(this.queued(), options.weight)); + } catch (error1) { + error = error1; + this.Events.trigger("debug", `Could not queue ${options.id}`, { args, options, error }); + job.doDrop({ error }); + return false; + } + if (blocked) { + job.doDrop(); + return true; + } else if (reachedHWM) { + shifted = strategy === Bottleneck3.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck3.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck3.prototype.strategy.OVERFLOW ? job : void 0; + if (shifted != null) { + shifted.doDrop(); + } + if (shifted == null || strategy === Bottleneck3.prototype.strategy.OVERFLOW) { + if (shifted == null) { + job.doDrop(); + } + return reachedHWM; + } + } + job.doQueue(reachedHWM, blocked); + this._queues.push(job); + await this._drainAll(); + return reachedHWM; + } + _receive(job) { + if (this._states.jobStatus(job.options.id) != null) { + job._reject(new Bottleneck3.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); + return false; + } else { + job.doReceive(); + return this._submitLock.schedule(this._addToQueue, job); + } + } + submit(...args) { + var cb, fn, job, options, ref, ref1, task; + if (typeof args[0] === "function") { + ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); + options = parser$5.load({}, this.jobDefaults); + } else { + ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); + options = parser$5.load(options, this.jobDefaults); + } + task = (...args2) => { + return new this.Promise(function(resolve, reject) { + return fn(...args2, function(...args3) { + return (args3[0] != null ? reject : resolve)(args3); + }); + }); + }; + job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + job.promise.then(function(args2) { + return typeof cb === "function" ? cb(...args2) : void 0; + }).catch(function(args2) { + if (Array.isArray(args2)) { + return typeof cb === "function" ? cb(...args2) : void 0; + } else { + return typeof cb === "function" ? cb(args2) : void 0; + } + }); + return this._receive(job); + } + schedule(...args) { + var job, options, task; + if (typeof args[0] === "function") { + [task, ...args] = args; + options = {}; + } else { + [options, task, ...args] = args; + } + job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + this._receive(job); + return job.promise; + } + wrap(fn) { + var schedule, wrapped; + schedule = this.schedule.bind(this); + wrapped = function(...args) { + return schedule(fn.bind(this), ...args); + }; + wrapped.withOptions = function(options, ...args) { + return schedule(options, fn, ...args); + }; + return wrapped; + } + async updateSettings(options = {}) { + await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); + parser$5.overwrite(options, this.instanceDefaults, this); + return this; + } + currentReservoir() { + return this._store.__currentReservoir__(); + } + incrementReservoir(incr = 0) { + return this._store.__incrementReservoir__(incr); + } + } + Bottleneck3.default = Bottleneck3; + Bottleneck3.Events = Events$4; + Bottleneck3.version = Bottleneck3.prototype.version = require$$8.version; + Bottleneck3.strategy = Bottleneck3.prototype.strategy = { + LEAK: 1, + OVERFLOW: 2, + OVERFLOW_PRIORITY: 4, + BLOCK: 3 + }; + Bottleneck3.BottleneckError = Bottleneck3.prototype.BottleneckError = BottleneckError_1; + Bottleneck3.Group = Bottleneck3.prototype.Group = Group_1; + Bottleneck3.RedisConnection = Bottleneck3.prototype.RedisConnection = require$$2; + Bottleneck3.IORedisConnection = Bottleneck3.prototype.IORedisConnection = require$$3; + Bottleneck3.Batcher = Bottleneck3.prototype.Batcher = Batcher_1; + Bottleneck3.prototype.jobDefaults = { + priority: DEFAULT_PRIORITY$1, + weight: 1, + expiration: null, + id: "" + }; + Bottleneck3.prototype.storeDefaults = { + maxConcurrent: null, + minTime: 0, + highWater: null, + strategy: Bottleneck3.prototype.strategy.LEAK, + penalty: null, + reservoir: null, + reservoirRefreshInterval: null, + reservoirRefreshAmount: null, + reservoirIncreaseInterval: null, + reservoirIncreaseAmount: null, + reservoirIncreaseMaximum: null + }; + Bottleneck3.prototype.localStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 250 + }; + Bottleneck3.prototype.redisStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 5e3, + clientTimeout: 1e4, + Redis: null, + clientOptions: {}, + clusterNodes: null, + clearDatastore: false, + connection: null + }; + Bottleneck3.prototype.instanceDefaults = { + datastore: "local", + connection: null, + id: "", + rejectOnDrop: true, + trackDoneStatus: false, + Promise + }; + Bottleneck3.prototype.stopDefaults = { + enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", + dropWaitingJobs: true, + dropErrorMessage: "This limiter has been stopped." + }; + return Bottleneck3; + }.call(commonjsGlobal); + var Bottleneck_1 = Bottleneck2; + var lib = Bottleneck_1; + return lib; + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/yamlAST.js +var require_yamlAST = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/yamlAST.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var Kind; + (function(Kind2) { + Kind2[Kind2["SCALAR"] = 0] = "SCALAR"; + Kind2[Kind2["MAPPING"] = 1] = "MAPPING"; + Kind2[Kind2["MAP"] = 2] = "MAP"; + Kind2[Kind2["SEQ"] = 3] = "SEQ"; + Kind2[Kind2["ANCHOR_REF"] = 4] = "ANCHOR_REF"; + Kind2[Kind2["INCLUDE_REF"] = 5] = "INCLUDE_REF"; + })(Kind = exports2.Kind || (exports2.Kind = {})); + function newMapping(key, value) { + var end = value ? value.endPosition : key.endPosition + 1; + var node = { + key, + value, + startPosition: key.startPosition, + endPosition: end, + kind: Kind.MAPPING, + parent: null, + errors: [] + }; + return node; + } + exports2.newMapping = newMapping; + function newAnchorRef(key, start, end, value) { + return { + errors: [], + referencesAnchor: key, + value, + startPosition: start, + endPosition: end, + kind: Kind.ANCHOR_REF, + parent: null + }; + } + exports2.newAnchorRef = newAnchorRef; + function newScalar(v) { + if (v === void 0) { + v = ""; + } + var result = { + errors: [], + startPosition: -1, + endPosition: -1, + value: "" + v, + kind: Kind.SCALAR, + parent: null, + doubleQuoted: false, + rawValue: "" + v + }; + if (typeof v !== "string") { + result.valueObject = v; + } + return result; + } + exports2.newScalar = newScalar; + function newItems() { + return { + errors: [], + startPosition: -1, + endPosition: -1, + items: [], + kind: Kind.SEQ, + parent: null + }; + } + exports2.newItems = newItems; + function newSeq() { + return newItems(); + } + exports2.newSeq = newSeq; + function newMap(mappings) { + return { + errors: [], + startPosition: -1, + endPosition: -1, + mappings: mappings ? mappings : [], + kind: Kind.MAP, + parent: null + }; + } + exports2.newMap = newMap; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/common.js +var require_common = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/common.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function isNothing(subject) { + return typeof subject === "undefined" || null === subject; + } + exports2.isNothing = isNothing; + function isObject2(subject) { + return typeof subject === "object" && null !== subject; + } + exports2.isObject = isObject2; + function toArray(sequence) { + if (Array.isArray(sequence)) { + return sequence; + } else if (isNothing(sequence)) { + return []; + } + return [sequence]; + } + exports2.toArray = toArray; + function extend(target, source) { + var index, length, key, sourceKeys; + if (source) { + sourceKeys = Object.keys(source); + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + return target; + } + exports2.extend = extend; + function repeat2(string, count) { + var result = "", cycle; + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + return result; + } + exports2.repeat = repeat2; + function isNegativeZero2(number) { + return 0 === number && Number.NEGATIVE_INFINITY === 1 / number; + } + exports2.isNegativeZero = isNegativeZero2; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/exception.js +var require_exception = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/exception.js"(exports2, module2) { + "use strict"; + var YAMLException = function() { + function YAMLException2(reason, mark, isWarning) { + if (mark === void 0) { + mark = null; + } + if (isWarning === void 0) { + isWarning = false; + } + this.name = "YAMLException"; + this.reason = reason; + this.mark = mark; + this.message = this.toString(false); + this.isWarning = isWarning; + } + YAMLException2.isInstance = function(instance) { + if (instance != null && instance.getClassIdentifier && typeof instance.getClassIdentifier == "function") { + for (var _i = 0, _a = instance.getClassIdentifier(); _i < _a.length; _i++) { + var currentIdentifier = _a[_i]; + if (currentIdentifier == YAMLException2.CLASS_IDENTIFIER) + return true; + } + } + return false; + }; + YAMLException2.prototype.getClassIdentifier = function() { + var superIdentifiers = []; + return superIdentifiers.concat(YAMLException2.CLASS_IDENTIFIER); + }; + YAMLException2.prototype.toString = function(compact) { + if (compact === void 0) { + compact = false; + } + var result; + result = "JS-YAML: " + (this.reason || "(unknown reason)"); + if (!compact && this.mark) { + result += " " + this.mark.toString(); + } + return result; + }; + YAMLException2.CLASS_IDENTIFIER = "yaml-ast-parser.YAMLException"; + return YAMLException2; + }(); + module2.exports = YAMLException; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/mark.js +var require_mark = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/mark.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var Mark2 = function() { + function Mark3(name, buffer, position, line, column) { + this.name = name; + this.buffer = buffer; + this.position = position; + this.line = line; + this.column = column; + } + Mark3.prototype.getSnippet = function(indent, maxLength) { + if (indent === void 0) { + indent = 0; + } + if (maxLength === void 0) { + maxLength = 75; + } + var head, start, tail, end, snippet; + if (!this.buffer) { + return null; + } + indent = indent || 4; + maxLength = maxLength || 75; + head = ""; + start = this.position; + while (start > 0 && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start - 1))) { + start -= 1; + if (this.position - start > maxLength / 2 - 1) { + head = " ... "; + start += 5; + break; + } + } + tail = ""; + end = this.position; + while (end < this.buffer.length && -1 === "\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end))) { + end += 1; + if (end - this.position > maxLength / 2 - 1) { + tail = " ... "; + end -= 5; + break; + } + } + snippet = this.buffer.slice(start, end); + return common.repeat(" ", indent) + head + snippet + tail + "\n" + common.repeat(" ", indent + this.position - start + head.length) + "^"; + }; + Mark3.prototype.toString = function(compact) { + if (compact === void 0) { + compact = true; + } + var snippet, where = ""; + if (this.name) { + where += 'in "' + this.name + '" '; + } + where += "at line " + (this.line + 1) + ", column " + (this.column + 1); + if (!compact) { + snippet = this.getSnippet(); + if (snippet) { + where += ":\n" + snippet; + } + } + return where; + }; + return Mark3; + }(); + module2.exports = Mark2; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type.js +var require_type = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var YAMLException = require_exception(); + var TYPE_CONSTRUCTOR_OPTIONS = [ + "kind", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "defaultStyle", + "styleAliases" + ]; + var YAML_NODE_KINDS = [ + "scalar", + "sequence", + "mapping" + ]; + function compileStyleAliases(map2) { + var result = {}; + if (null !== map2) { + Object.keys(map2).forEach(function(style) { + map2[style].forEach(function(alias) { + result[String(alias)] = style; + }); + }); + } + return result; + } + var Type2 = /* @__PURE__ */ function() { + function Type3(tag, options) { + options = options || {}; + Object.keys(options).forEach(function(name) { + if (-1 === TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + this.tag = tag; + this.kind = options["kind"] || null; + this.resolve = options["resolve"] || function() { + return true; + }; + this.construct = options["construct"] || function(data) { + return data; + }; + this.instanceOf = options["instanceOf"] || null; + this.predicate = options["predicate"] || null; + this.represent = options["represent"] || null; + this.defaultStyle = options["defaultStyle"] || null; + this.styleAliases = compileStyleAliases(options["styleAliases"] || null); + if (-1 === YAML_NODE_KINDS.indexOf(this.kind)) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + return Type3; + }(); + exports2.Type = Type2; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/schema.js +var require_schema = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/schema.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var common = require_common(); + var YAMLException = require_exception(); + var type_1 = require_type(); + function compileList2(schema, name, result) { + var exclude = []; + schema.include.forEach(function(includedSchema) { + result = compileList2(includedSchema, name, result); + }); + schema[name].forEach(function(currentType) { + result.forEach(function(previousType, previousIndex) { + if (previousType.tag === currentType.tag) { + exclude.push(previousIndex); + } + }); + result.push(currentType); + }); + return result.filter(function(type, index) { + return -1 === exclude.indexOf(index); + }); + } + function compileMap2() { + var result = {}, index, length; + function collectType(type) { + result[type.tag] = type; + } + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + var Schema2 = function() { + function Schema3(definition) { + this.include = definition.include || []; + this.implicit = definition.implicit || []; + this.explicit = definition.explicit || []; + this.implicit.forEach(function(type) { + if (type.loadKind && "scalar" !== type.loadKind) { + throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + } + }); + this.compiledImplicit = compileList2(this, "implicit", []); + this.compiledExplicit = compileList2(this, "explicit", []); + this.compiledTypeMap = compileMap2(this.compiledImplicit, this.compiledExplicit); + } + Schema3.DEFAULT = null; + Schema3.create = function createSchema() { + var schemas, types; + switch (arguments.length) { + case 1: + schemas = Schema3.DEFAULT; + types = arguments[0]; + break; + case 2: + schemas = arguments[0]; + types = arguments[1]; + break; + default: + throw new YAMLException("Wrong number of arguments for Schema.create function"); + } + schemas = common.toArray(schemas); + types = common.toArray(types); + if (!schemas.every(function(schema) { + return schema instanceof Schema3; + })) { + throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object."); + } + if (!types.every(function(type) { + return type instanceof type_1.Type; + })) { + throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object."); + } + return new Schema3({ + include: schemas, + explicit: types + }); + }; + return Schema3; + }(); + exports2.Schema = Schema2; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/str.js +var require_str = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/str.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + module2.exports = new type_1.Type("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(data) { + return null !== data ? data : ""; + } + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/seq.js +var require_seq = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/seq.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + module2.exports = new type_1.Type("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(data) { + return null !== data ? data : []; + } + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/map.js +var require_map = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/map.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + module2.exports = new type_1.Type("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(data) { + return null !== data ? data : {}; + } + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/schema/failsafe.js +var require_failsafe = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/schema/failsafe.js"(exports2, module2) { + "use strict"; + var schema_1 = require_schema(); + module2.exports = new schema_1.Schema({ + explicit: [ + require_str(), + require_seq(), + require_map() + ] + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/null.js +var require_null = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/null.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + function resolveYamlNull2(data) { + if (null === data) { + return true; + } + var max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); + } + function constructYamlNull2() { + return null; + } + function isNull2(object) { + return null === object; + } + module2.exports = new type_1.Type("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: resolveYamlNull2, + construct: constructYamlNull2, + predicate: isNull2, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/bool.js +var require_bool = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/bool.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + function resolveYamlBoolean2(data) { + if (null === data) { + return false; + } + var max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); + } + function constructYamlBoolean2(data) { + return data === "true" || data === "True" || data === "TRUE"; + } + function isBoolean2(object) { + return "[object Boolean]" === Object.prototype.toString.call(object); + } + module2.exports = new type_1.Type("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: resolveYamlBoolean2, + construct: constructYamlBoolean2, + predicate: isBoolean2, + represent: { + lowercase: function(object) { + return object ? "true" : "false"; + }, + uppercase: function(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase: function(object) { + return object ? "True" : "False"; + } + }, + defaultStyle: "lowercase" + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/int.js +var require_int = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/int.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var type_1 = require_type(); + function isHexCode2(c) { + return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102; + } + function isOctCode2(c) { + return 48 <= c && c <= 55; + } + function isDecCode2(c) { + return 48 <= c && c <= 57; + } + function resolveYamlInteger2(data) { + if (null === data) { + return false; + } + var max = data.length, index = 0, hasDigits = false, ch; + if (!max) { + return false; + } + ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) { + return true; + } + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") { + continue; + } + if (ch !== "0" && ch !== "1") { + return false; + } + hasDigits = true; + } + return hasDigits; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") { + continue; + } + if (!isHexCode2(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + return hasDigits; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") { + continue; + } + if (!isOctCode2(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + return hasDigits; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") { + continue; + } + if (ch === ":") { + break; + } + if (!isDecCode2(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + if (!hasDigits) { + return false; + } + if (ch !== ":") { + return true; + } + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); + } + function constructYamlInteger2(data) { + var value = data, sign = 1, ch, base, digits = []; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); + } + ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") { + sign = -1; + } + value = value.slice(1); + ch = value[0]; + } + if ("0" === value) { + return 0; + } + if (ch === "0") { + if (value[1] === "b") { + return sign * parseInt(value.slice(2), 2); + } + if (value[1] === "x") { + return sign * parseInt(value, 16); + } + return sign * parseInt(value, 8); + } + if (value.indexOf(":") !== -1) { + value.split(":").forEach(function(v) { + digits.unshift(parseInt(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseInt(value, 10); + } + function isInteger2(object) { + return "[object Number]" === Object.prototype.toString.call(object) && (0 === object % 1 && !common.isNegativeZero(object)); + } + module2.exports = new type_1.Type("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: resolveYamlInteger2, + construct: constructYamlInteger2, + predicate: isInteger2, + represent: { + binary: function(object) { + return "0b" + object.toString(2); + }, + octal: function(object) { + return "0" + object.toString(8); + }, + decimal: function(object) { + return object.toString(10); + }, + hexadecimal: function(object) { + return "0x" + object.toString(16).toUpperCase(); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/float.js +var require_float = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/float.js"(exports2, module2) { + "use strict"; + var common = require_common(); + var type_1 = require_type(); + var YAML_FLOAT_PATTERN2 = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); + function resolveYamlFloat2(data) { + if (null === data) { + return false; + } + var value, sign, base, digits; + if (!YAML_FLOAT_PATTERN2.test(data)) { + return false; + } + return true; + } + function constructYamlFloat2(data) { + var value, sign, base, digits; + value = data.replace(/_/g, "").toLowerCase(); + sign = "-" === value[0] ? -1 : 1; + digits = []; + if (0 <= "+-".indexOf(value[0])) { + value = value.slice(1); + } + if (".inf" === value) { + return 1 === sign ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } else if (".nan" === value) { + return NaN; + } else if (0 <= value.indexOf(":")) { + value.split(":").forEach(function(v) { + digits.unshift(parseFloat(v, 10)); + }); + value = 0; + base = 1; + digits.forEach(function(d) { + value += d * base; + base *= 60; + }); + return sign * value; + } + return sign * parseFloat(value, 10); + } + function representYamlFloat2(object, style) { + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (common.isNegativeZero(object)) { + return "-0.0"; + } + return object.toString(10); + } + function isFloat2(object) { + return "[object Number]" === Object.prototype.toString.call(object) && (0 !== object % 1 || common.isNegativeZero(object)); + } + module2.exports = new type_1.Type("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: resolveYamlFloat2, + construct: constructYamlFloat2, + predicate: isFloat2, + represent: representYamlFloat2, + defaultStyle: "lowercase" + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/schema/json.js +var require_json = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/schema/json.js"(exports2, module2) { + "use strict"; + var schema_1 = require_schema(); + module2.exports = new schema_1.Schema({ + include: [ + require_failsafe() + ], + implicit: [ + require_null(), + require_bool(), + require_int(), + require_float() + ] + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/schema/core.js +var require_core2 = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/schema/core.js"(exports2, module2) { + "use strict"; + var schema_1 = require_schema(); + module2.exports = new schema_1.Schema({ + include: [ + require_json() + ] + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/timestamp.js +var require_timestamp = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/timestamp.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + var YAML_TIMESTAMP_REGEXP2 = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$"); + function resolveYamlTimestamp2(data) { + if (null === data) { + return false; + } + var match2, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match2 = YAML_TIMESTAMP_REGEXP2.exec(data); + if (null === match2) { + return false; + } + return true; + } + function constructYamlTimestamp2(data) { + var match2, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date; + match2 = YAML_TIMESTAMP_REGEXP2.exec(data); + if (null === match2) { + throw new Error("Date resolve error"); + } + year = +match2[1]; + month = +match2[2] - 1; + day = +match2[3]; + if (!match2[4]) { + return new Date(Date.UTC(year, month, day)); + } + hour = +match2[4]; + minute = +match2[5]; + second = +match2[6]; + if (match2[7]) { + fraction = match2[7].slice(0, 3); + while (fraction.length < 3) { + fraction = fraction + "0"; + } + fraction = +fraction; + } + if (match2[9]) { + tz_hour = +match2[10]; + tz_minute = +(match2[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 6e4; + if ("-" === match2[9]) { + delta = -delta; + } + } + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + if (delta) { + date.setTime(date.getTime() - delta); + } + return date; + } + function representYamlTimestamp2(object) { + return object.toISOString(); + } + module2.exports = new type_1.Type("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: resolveYamlTimestamp2, + construct: constructYamlTimestamp2, + instanceOf: Date, + represent: representYamlTimestamp2 + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/merge.js +var require_merge = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/merge.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + function resolveYamlMerge2(data) { + return "<<" === data || null === data; + } + module2.exports = new type_1.Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge2 + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/binary.js +var require_binary = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/binary.js"(exports2, module2) { + "use strict"; + var NodeBuffer = require("buffer").Buffer; + var type_1 = require_type(); + var BASE64_MAP2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; + function resolveYamlBinary2(data) { + if (null === data) { + return false; + } + var code, idx, bitlen = 0, len = 0, max = data.length, map2 = BASE64_MAP2; + for (idx = 0; idx < max; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) { + continue; + } + if (code < 0) { + return false; + } + bitlen += 6; + } + return bitlen % 8 === 0; + } + function constructYamlBinary2(data) { + var code, idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map2 = BASE64_MAP2, bits = 0, result = []; + for (idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map2.indexOf(input.charAt(idx)); + } + tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + if (NodeBuffer) { + return new NodeBuffer(result); + } + return result; + } + function representYamlBinary2(object) { + var result = "", bits = 0, idx, tail, max = object.length, map2 = BASE64_MAP2; + for (idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + tail = max % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; + } + function isBinary2(object) { + return NodeBuffer && NodeBuffer.isBuffer(object); + } + module2.exports = new type_1.Type("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: resolveYamlBinary2, + construct: constructYamlBinary2, + predicate: isBinary2, + represent: representYamlBinary2 + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/omap.js +var require_omap = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/omap.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var _toString3 = Object.prototype.toString; + function resolveYamlOmap2(data) { + if (null === data) { + return true; + } + var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + if ("[object Object]" !== _toString3.call(pair)) { + return false; + } + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) { + pairHasKey = true; + } else { + return false; + } + } + } + if (!pairHasKey) { + return false; + } + if (-1 === objectKeys.indexOf(pairKey)) { + objectKeys.push(pairKey); + } else { + return false; + } + } + return true; + } + function constructYamlOmap(data) { + return null !== data ? data : []; + } + module2.exports = new type_1.Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap2, + construct: constructYamlOmap + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/pairs.js +var require_pairs = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/pairs.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + var ast = require_yamlAST(); + var _toString3 = Object.prototype.toString; + function resolveYamlPairs2(data) { + if (null === data) { + return true; + } + if (data.kind != ast.Kind.SEQ) { + return false; + } + var index, length, pair, keys, result, object = data.items; + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + if ("[object Object]" !== _toString3.call(pair)) { + return false; + } + if (!Array.isArray(pair.mappings)) { + return false; + } + if (1 !== pair.mappings.length) { + return false; + } + } + return true; + } + function constructYamlPairs2(data) { + if (null === data || !Array.isArray(data.items)) { + return []; + } + var index, length, keys, result, object = data.items; + result = ast.newItems(); + result.parent = data.parent; + result.startPosition = data.startPosition; + result.endPosition = data.endPosition; + for (index = 0, length = object.length; index < length; index += 1) { + var pair = object[index]; + var mapping = pair.mappings[0]; + var pairSeq = ast.newItems(); + pairSeq.parent = result; + pairSeq.startPosition = mapping.key.startPosition; + pairSeq.endPosition = mapping.value.startPosition; + mapping.key.parent = pairSeq; + mapping.value.parent = pairSeq; + pairSeq.items = [mapping.key, mapping.value]; + result.items.push(pairSeq); + } + return result; + } + module2.exports = new type_1.Type("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: resolveYamlPairs2, + construct: constructYamlPairs2 + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/set.js +var require_set = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/set.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + var ast = require_yamlAST(); + function resolveYamlSet2(data) { + if (null === data) { + return true; + } + if (data.kind != ast.Kind.MAP) { + return false; + } + return true; + } + function constructYamlSet2(data) { + return null !== data ? data : {}; + } + module2.exports = new type_1.Type("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: resolveYamlSet2, + construct: constructYamlSet2 + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/schema/default_safe.js +var require_default_safe = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/schema/default_safe.js"(exports2, module2) { + "use strict"; + var schema_1 = require_schema(); + var schema = new schema_1.Schema({ + include: [ + require_core2() + ], + implicit: [ + require_timestamp(), + require_merge() + ], + explicit: [ + require_binary(), + require_omap(), + require_pairs(), + require_set() + ] + }); + module2.exports = schema; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/js/undefined.js +var require_undefined = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/js/undefined.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + function resolveJavascriptUndefined() { + return true; + } + function constructJavascriptUndefined() { + return void 0; + } + function representJavascriptUndefined() { + return ""; + } + function isUndefined(object) { + return "undefined" === typeof object; + } + module2.exports = new type_1.Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve: resolveJavascriptUndefined, + construct: constructJavascriptUndefined, + predicate: isUndefined, + represent: representJavascriptUndefined + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/type/js/regexp.js +var require_regexp = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/type/js/regexp.js"(exports2, module2) { + "use strict"; + var type_1 = require_type(); + function resolveJavascriptRegExp(data) { + if (null === data) { + return false; + } + if (0 === data.length) { + return false; + } + var regexp2 = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if ("/" === regexp2[0]) { + if (tail) { + modifiers = tail[1]; + } + if (modifiers.length > 3) { + return false; + } + if (regexp2[regexp2.length - modifiers.length - 1] !== "/") { + return false; + } + regexp2 = regexp2.slice(1, regexp2.length - modifiers.length - 1); + } + try { + var dummy = new RegExp(regexp2, modifiers); + return true; + } catch (error) { + return false; + } + } + function constructJavascriptRegExp(data) { + var regexp2 = data, tail = /\/([gim]*)$/.exec(data), modifiers = ""; + if ("/" === regexp2[0]) { + if (tail) { + modifiers = tail[1]; + } + regexp2 = regexp2.slice(1, regexp2.length - modifiers.length - 1); + } + return new RegExp(regexp2, modifiers); + } + function representJavascriptRegExp(object) { + var result = "/" + object.source + "/"; + if (object.global) { + result += "g"; + } + if (object.multiline) { + result += "m"; + } + if (object.ignoreCase) { + result += "i"; + } + return result; + } + function isRegExp(object) { + return "[object RegExp]" === Object.prototype.toString.call(object); + } + module2.exports = new type_1.Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve: resolveJavascriptRegExp, + construct: constructJavascriptRegExp, + predicate: isRegExp, + represent: representJavascriptRegExp + }); + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/schema/default_full.js +var require_default_full = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/schema/default_full.js"(exports2, module2) { + "use strict"; + var schema_1 = require_schema(); + var schema = new schema_1.Schema({ + include: [ + require_default_safe() + ], + explicit: [ + require_undefined(), + require_regexp() + ] + }); + schema_1.Schema.DEFAULT = schema; + module2.exports = schema; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/loader.js +var require_loader = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/loader.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ast = require_yamlAST(); + var common = require_common(); + var YAMLException = require_exception(); + var Mark2 = require_mark(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + function is_EOL(c) { + return c === 10 || c === 13; + } + function is_WHITE_SPACE(c) { + return c === 9 || c === 32; + } + function is_WS_OR_EOL(c) { + return c === 9 || c === 32 || c === 10 || c === 13; + } + function is_FLOW_INDICATOR(c) { + return 44 === c || 91 === c || 93 === c || 123 === c || 125 === c; + } + function fromHexCode(c) { + var lc; + if (48 <= c && c <= 57) { + return c - 48; + } + lc = c | 32; + if (97 <= lc && lc <= 102) { + return lc - 97 + 10; + } + return -1; + } + function escapedHexLen(c) { + if (c === 120) { + return 2; + } + if (c === 117) { + return 4; + } + if (c === 85) { + return 8; + } + return 0; + } + function fromDecimalCode(c) { + if (48 <= c && c <= 57) { + return c - 48; + } + return -1; + } + function simpleEscapeSequence2(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + } + function charFromCodepoint(c) { + if (c <= 65535) { + return String.fromCharCode(c); + } + return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + } + var simpleEscapeCheck2 = new Array(256); + var simpleEscapeMap2 = new Array(256); + var customEscapeCheck = new Array(256); + var customEscapeMap = new Array(256); + for (i = 0; i < 256; i++) { + customEscapeMap[i] = simpleEscapeMap2[i] = simpleEscapeSequence2(i); + simpleEscapeCheck2[i] = simpleEscapeMap2[i] ? 1 : 0; + customEscapeCheck[i] = 1; + if (!simpleEscapeCheck2[i]) { + customEscapeMap[i] = "\\" + String.fromCharCode(i); + } + } + var i; + var State2 = /* @__PURE__ */ function() { + function State3(input, options) { + this.errorMap = {}; + this.errors = []; + this.lines = []; + this.input = input; + this.filename = options["filename"] || null; + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.onWarning = options["onWarning"] || null; + this.legacy = options["legacy"] || false; + this.allowAnyEscape = options["allowAnyEscape"] || false; + this.ignoreDuplicateKeys = options["ignoreDuplicateKeys"] || false; + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + this.documents = []; + } + return State3; + }(); + function generateError(state, message2, isWarning) { + if (isWarning === void 0) { + isWarning = false; + } + return new YAMLException(message2, new Mark2(state.filename, state.input, state.position, state.line, state.position - state.lineStart), isWarning); + } + function throwErrorFromPosition(state, position, message2, isWarning, toLineEnd) { + if (isWarning === void 0) { + isWarning = false; + } + if (toLineEnd === void 0) { + toLineEnd = false; + } + var line = positionToLine(state, position); + if (!line) { + return; + } + var hash = message2 + position; + if (state.errorMap[hash]) { + return; + } + var mark = new Mark2(state.filename, state.input, position, line.line, position - line.start); + if (toLineEnd) { + mark.toLineEnd = true; + } + var error = new YAMLException(message2, mark, isWarning); + state.errors.push(error); + } + function throwError(state, message2) { + var error = generateError(state, message2); + var hash = error.message + error.mark.position; + if (state.errorMap[hash]) { + return; + } + state.errors.push(error); + state.errorMap[hash] = 1; + var or = state.position; + while (true) { + if (state.position >= state.input.length - 1) { + return; + } + var c = state.input.charAt(state.position); + if (c == "\n") { + state.position--; + if (state.position == or) { + state.position += 1; + } + return; + } + if (c == "\r") { + state.position--; + if (state.position == or) { + state.position += 1; + } + return; + } + state.position++; + } + } + function throwWarning(state, message2) { + var error = generateError(state, message2); + if (state.onWarning) { + state.onWarning.call(null, error); + } else { + } + } + var directiveHandlers = { + YAML: function handleYamlDirective(state, name, args) { + var match2, major, minor; + if (null !== state.version) { + throwError(state, "duplication of %YAML directive"); + } + if (1 !== args.length) { + throwError(state, "YAML directive accepts exactly one argument"); + } + match2 = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + if (null === match2) { + throwError(state, "ill-formed argument of the YAML directive"); + } + major = parseInt(match2[1], 10); + minor = parseInt(match2[2], 10); + if (1 !== major) { + throwError(state, "found incompatible YAML document (version 1.2 is required)"); + } + state.version = args[0]; + state.checkLineBreaks = minor < 2; + if (2 !== minor) { + throwError(state, "found incompatible YAML document (version 1.2 is required)"); + } + }, + TAG: function handleTagDirective(state, name, args) { + var handle, prefix; + if (2 !== args.length) { + throwError(state, "TAG directive accepts exactly two arguments"); + } + handle = args[0]; + prefix = args[1]; + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, "ill-formed tag handle (first argument) of the TAG directive"); + } + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, "ill-formed tag prefix (second argument) of the TAG directive"); + } + state.tagMap[handle] = prefix; + } + }; + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + var scalar = state.result; + if (scalar.startPosition == -1) { + scalar.startPosition = start; + } + if (start <= end) { + _result = state.input.slice(start, end); + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(9 === _character || 32 <= _character && _character <= 1114111)) { + throwError(state, "expected valid JSON character"); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, "the stream contains non-printable characters"); + } + scalar.value += _result; + scalar.endPosition = end; + } + } + function storeMappingPair(state, _result, keyTag, keyNode, valueNode) { + var index, quantity; + if (keyNode == null) { + return; + } + if (null === _result) { + _result = { + startPosition: keyNode.startPosition, + endPosition: valueNode.endPosition, + parent: null, + errors: [], + mappings: [], + kind: ast.Kind.MAP + }; + } + var mapping = ast.newMapping(keyNode, valueNode); + mapping.parent = _result; + keyNode.parent = mapping; + if (valueNode != null) { + valueNode.parent = mapping; + } + !state.ignoreDuplicateKeys && _result.mappings.forEach(function(sibling) { + if (sibling.key && sibling.key.value === (mapping.key && mapping.key.value)) { + throwErrorFromPosition(state, mapping.key.startPosition, "duplicate key"); + throwErrorFromPosition(state, sibling.key.startPosition, "duplicate key"); + } + }); + _result.mappings.push(mapping); + _result.endPosition = valueNode ? valueNode.endPosition : keyNode.endPosition + 1; + return _result; + } + function readLineBreak(state) { + var ch; + ch = state.input.charCodeAt(state.position); + if (10 === ch) { + state.position++; + } else if (13 === ch) { + state.position++; + if (10 === state.input.charCodeAt(state.position)) { + state.position++; + } + } else { + throwError(state, "a line break is expected"); + } + state.line += 1; + state.lineStart = state.position; + state.lines.push({ + start: state.lineStart, + line: state.line + }); + } + function positionToLine(state, position) { + var line; + for (var i2 = 0; i2 < state.lines.length; i2++) { + if (state.lines[i2].start > position) { + break; + } + line = state.lines[i2]; + } + if (!line) { + return { + start: 0, + line: 0 + }; + } + return line; + } + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, ch = state.input.charCodeAt(state.position); + while (0 !== ch) { + while (is_WHITE_SPACE(ch)) { + if (ch === 9) { + state.errors.push(generateError(state, "Using tabs can lead to unpredictable results", true)); + } + ch = state.input.charCodeAt(++state.position); + } + if (allowComments && 35 === ch) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 10 && ch !== 13 && 0 !== ch); + } + if (is_EOL(ch)) { + readLineBreak(state); + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + while (32 === ch) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + if (-1 !== checkIndent && 0 !== lineBreaks && state.lineIndent < checkIndent) { + throwWarning(state, "deficient indentation"); + } + return lineBreaks; + } + function testDocumentSeparator(state) { + var _position = state.position, ch; + ch = state.input.charCodeAt(_position); + if ((45 === ch || 46 === ch) && state.input.charCodeAt(_position + 1) === ch && state.input.charCodeAt(_position + 2) === ch) { + _position += 3; + ch = state.input.charCodeAt(_position); + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + return false; + } + function writeFoldedLines(state, scalar, count) { + if (1 === count) { + scalar.value += " "; + } else if (count > 1) { + scalar.value += common.repeat("\n", count - 1); + } + } + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch; + var state_result = ast.newScalar(); + state_result.plainScalar = true; + state.result = state_result; + ch = state.input.charCodeAt(state.position); + if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || 35 === ch || 38 === ch || 42 === ch || 33 === ch || 124 === ch || 62 === ch || 39 === ch || 34 === ch || 37 === ch || 64 === ch || 96 === ch) { + return false; + } + if (63 === ch || 45 === ch) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + state.kind = "scalar"; + captureStart = captureEnd = state.position; + hasPendingContent = false; + while (0 !== ch) { + if (58 === ch) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + } else if (35 === ch) { + preceding = state.input.charCodeAt(state.position - 1); + if (is_WS_OR_EOL(preceding)) { + break; + } + } else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state_result, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + ch = state.input.charCodeAt(++state.position); + if (state.position >= state.input.length) { + return false; + } + } + captureSegment(state, captureStart, captureEnd, false); + if (state.result.startPosition != -1) { + state_result.rawValue = state.input.substring(state_result.startPosition, state_result.endPosition); + return true; + } + state.kind = _kind; + state.result = _result; + return false; + } + function readSingleQuotedScalar(state, nodeIndent) { + var ch, captureStart, captureEnd; + ch = state.input.charCodeAt(state.position); + if (39 !== ch) { + return false; + } + var scalar = ast.newScalar(); + scalar.singleQuoted = true; + state.kind = "scalar"; + state.result = scalar; + scalar.startPosition = state.position; + state.position++; + captureStart = captureEnd = state.position; + while (0 !== (ch = state.input.charCodeAt(state.position))) { + if (39 === ch) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + scalar.endPosition = state.position; + if (39 === ch) { + captureStart = captureEnd = state.position; + state.position++; + } else { + return true; + } + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, scalar, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a single quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + scalar.endPosition = state.position; + } + } + throwError(state, "unexpected end of the stream within a single quoted scalar"); + } + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, captureEnd, hexLength, hexResult, tmp, tmpEsc, ch; + ch = state.input.charCodeAt(state.position); + if (34 !== ch) { + return false; + } + state.kind = "scalar"; + var scalar = ast.newScalar(); + scalar.doubleQuoted = true; + state.result = scalar; + scalar.startPosition = state.position; + state.position++; + captureStart = captureEnd = state.position; + while (0 !== (ch = state.input.charCodeAt(state.position))) { + if (34 === ch) { + captureSegment(state, captureStart, state.position, true); + state.position++; + scalar.endPosition = state.position; + scalar.rawValue = state.input.substring(scalar.startPosition, scalar.endPosition); + return true; + } else if (92 === ch) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + } else if (ch < 256 && (state.allowAnyEscape ? customEscapeCheck[ch] : simpleEscapeCheck2[ch])) { + scalar.value += state.allowAnyEscape ? customEscapeMap[ch] : simpleEscapeMap2[ch]; + state.position++; + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + } else { + throwError(state, "expected hexadecimal character"); + } + } + scalar.value += charFromCodepoint(hexResult); + state.position++; + } else { + throwError(state, "unknown escape sequence"); + } + captureStart = captureEnd = state.position; + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, scalar, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, "unexpected end of the document within a double quoted scalar"); + } else { + state.position++; + captureEnd = state.position; + } + } + throwError(state, "unexpected end of the stream within a double quoted scalar"); + } + function readFlowCollection(state, nodeIndent) { + var readNext = true, _line, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, keyNode, keyTag, valueNode, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 91) { + terminator = 93; + isMapping = false; + _result = ast.newItems(); + _result.startPosition = state.position; + } else if (ch === 123) { + terminator = 125; + isMapping = true; + _result = ast.newMap(); + _result.startPosition = state.position; + } else { + return false; + } + if (null !== state.anchor) { + _result.anchorId = state.anchor; + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(++state.position); + while (0 !== ch) { + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? "mapping" : "sequence"; + state.result = _result; + _result.endPosition = state.position; + return true; + } else if (!readNext) { + var p = state.position; + throwError(state, "missed comma between flow collection entries"); + state.position = p + 1; + } + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + if (63 === ch) { + following = state.input.charCodeAt(state.position + 1); + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if ((isExplicitPair || state.line === _line) && 58 === ch) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + if (isMapping) { + storeMappingPair(state, _result, keyTag, keyNode, valueNode); + } else if (isPair) { + var mp = storeMappingPair(state, null, keyTag, keyNode, valueNode); + mp.parent = _result; + _result.items.push(mp); + } else { + if (keyNode) { + keyNode.parent = _result; + } + _result.items.push(keyNode); + } + _result.endPosition = state.position + 1; + skipSeparationSpace(state, true, nodeIndent); + ch = state.input.charCodeAt(state.position); + if (44 === ch) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + throwError(state, "unexpected end of the stream within a flow collection"); + } + function readBlockScalar(state, nodeIndent) { + var captureStart, folding, chomping = CHOMPING_CLIP, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch; + ch = state.input.charCodeAt(state.position); + if (ch === 124) { + folding = false; + } else if (ch === 62) { + folding = true; + } else { + return false; + } + var sc = ast.newScalar(); + state.kind = "scalar"; + state.result = sc; + sc.startPosition = state.position; + while (0 !== ch) { + ch = state.input.charCodeAt(++state.position); + if (43 === ch || 45 === ch) { + if (CHOMPING_CLIP === chomping) { + chomping = 43 === ch ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, "repeat of a chomping mode identifier"); + } + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one"); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, "repeat of an indentation width identifier"); + } + } else { + break; + } + } + if (is_WHITE_SPACE(ch)) { + do { + ch = state.input.charCodeAt(++state.position); + } while (is_WHITE_SPACE(ch)); + if (35 === ch) { + do { + ch = state.input.charCodeAt(++state.position); + } while (!is_EOL(ch) && 0 !== ch); + } + } + while (0 !== ch) { + readLineBreak(state); + state.lineIndent = 0; + ch = state.input.charCodeAt(state.position); + while ((!detectedIndent || state.lineIndent < textIndent) && 32 === ch) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + if (is_EOL(ch)) { + emptyLines++; + continue; + } + if (state.lineIndent < textIndent) { + if (chomping === CHOMPING_KEEP) { + sc.value += common.repeat("\n", emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (detectedIndent) { + sc.value += "\n"; + } + } + break; + } + if (folding) { + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + sc.value += common.repeat("\n", emptyLines + 1); + } else if (atMoreIndented) { + atMoreIndented = false; + sc.value += common.repeat("\n", emptyLines + 1); + } else if (0 === emptyLines) { + if (detectedIndent) { + sc.value += " "; + } + } else { + sc.value += common.repeat("\n", emptyLines); + } + } else if (detectedIndent) { + sc.value += common.repeat("\n", emptyLines + 1); + } else { + } + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + while (!is_EOL(ch) && 0 !== ch) { + ch = state.input.charCodeAt(++state.position); + } + captureSegment(state, captureStart, state.position, false); + } + sc.endPosition = state.position; + var i2 = state.position - 1; + var needMinus = false; + while (true) { + var c = state.input[i2]; + if (c == "\r" || c == "\n") { + if (needMinus) { + i2--; + } + break; + } + if (c != " " && c != " ") { + break; + } + i2--; + } + sc.endPosition = i2; + sc.rawValue = state.input.substring(sc.startPosition, sc.endPosition); + return true; + } + function readBlockSequence(state, nodeIndent) { + var _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newItems(), following, detected = false, ch; + if (null !== state.anchor) { + _result.anchorId = state.anchor; + state.anchorMap[state.anchor] = _result; + } + _result.startPosition = state.position; + ch = state.input.charCodeAt(state.position); + while (0 !== ch) { + if (45 !== ch) { + break; + } + following = state.input.charCodeAt(state.position + 1); + if (!is_WS_OR_EOL(following)) { + break; + } + detected = true; + state.position++; + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.items.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + if (state.result) { + state.result.parent = _result; + _result.items.push(state.result); + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if ((state.line === _line || state.lineIndent > nodeIndent) && 0 !== ch) { + throwError(state, "bad indentation of a sequence entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + _result.endPosition = state.position; + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "sequence"; + state.result = _result; + _result.endPosition = state.position; + return true; + } + return false; + } + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, allowCompact, _line, _tag = state.tag, _anchor = state.anchor, _result = ast.newMap(), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch; + _result.startPosition = state.position; + if (null !== state.anchor) { + _result.anchorId = state.anchor; + state.anchorMap[state.anchor] = _result; + } + ch = state.input.charCodeAt(state.position); + while (0 !== ch) { + following = state.input.charCodeAt(state.position + 1); + _line = state.line; + if ((63 === ch || 58 === ch) && is_WS_OR_EOL(following)) { + if (63 === ch) { + if (atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = true; + allowCompact = true; + } else if (atExplicitKey) { + atExplicitKey = false; + allowCompact = true; + } else { + throwError(state, "incomplete explicit mapping pair; a key node is missed"); + } + state.position += 1; + ch = following; + } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (58 === ch) { + ch = state.input.charCodeAt(++state.position); + if (!is_WS_OR_EOL(ch)) { + throwError(state, "a whitespace character is expected after the key-value separator within a block mapping"); + } + if (atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, null); + keyTag = keyNode = valueNode = null; + } + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + } else if (state.position == state.lineStart && testDocumentSeparator(state)) { + break; + } else if (detected) { + throwError(state, "can not read an implicit mapping pair; a colon is missed"); + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else if (detected) { + throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key"); + while (state.position > 0) { + ch = state.input.charCodeAt(--state.position); + if (is_EOL(ch)) { + state.position++; + break; + } + } + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; + } + } else { + break; + } + if (state.line === _line || state.lineIndent > nodeIndent) { + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + if (!atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, valueNode); + keyTag = keyNode = valueNode = null; + } + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + if (state.lineIndent > nodeIndent && 0 !== ch) { + throwError(state, "bad indentation of a mapping entry"); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + if (atExplicitKey) { + storeMappingPair(state, _result, keyTag, keyNode, null); + } + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = "mapping"; + state.result = _result; + } + return detected; + } + function readTagProperty(state) { + var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch; + ch = state.input.charCodeAt(state.position); + if (33 !== ch) { + return false; + } + if (null !== state.tag) { + throwError(state, "duplication of a tag property"); + } + ch = state.input.charCodeAt(++state.position); + if (60 === ch) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + } else if (33 === ch) { + isNamed = true; + tagHandle = "!!"; + ch = state.input.charCodeAt(++state.position); + } else { + tagHandle = "!"; + } + _position = state.position; + if (isVerbatim) { + do { + ch = state.input.charCodeAt(++state.position); + } while (0 !== ch && 62 !== ch); + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, "unexpected end of the stream within a verbatim tag"); + } + } else { + while (0 !== ch && !is_WS_OR_EOL(ch)) { + if (33 === ch) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, "named tag handle cannot contain such characters"); + } + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, "tag suffix cannot contain exclamation marks"); + } + } + ch = state.input.charCodeAt(++state.position); + } + tagName = state.input.slice(_position, state.position); + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, "tag suffix cannot contain flow indicator characters"); + } + } + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, "tag name cannot contain such characters: " + tagName); + } + if (isVerbatim) { + state.tag = tagName; + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + } else if ("!" === tagHandle) { + state.tag = "!" + tagName; + } else if ("!!" === tagHandle) { + state.tag = "tag:yaml.org,2002:" + tagName; + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + return true; + } + function readAnchorProperty(state) { + var _position, ch; + ch = state.input.charCodeAt(state.position); + if (38 !== ch) { + return false; + } + if (null !== state.anchor) { + throwError(state, "duplication of an anchor property"); + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position === _position) { + throwError(state, "name of an anchor node must contain at least one character"); + } + state.anchor = state.input.slice(_position, state.position); + return true; + } + function readAlias(state) { + var _position, alias, len = state.length, input = state.input, ch; + ch = state.input.charCodeAt(state.position); + if (42 !== ch) { + return false; + } + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (state.position <= _position) { + throwError(state, "name of an alias node must contain at least one character"); + state.position = _position + 1; + } + alias = state.input.slice(_position, state.position); + if (!state.anchorMap.hasOwnProperty(alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + if (state.position <= _position) { + state.position = _position + 1; + } + } + state.result = ast.newAnchorRef(alias, _position, state.position, state.anchorMap[alias]); + skipSeparationSpace(state, true, -1); + return true; + } + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, type, flowIndent, blockIndent, _result; + state.tag = null; + state.anchor = null; + state.kind = null; + state.result = null; + allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext; + if (allowToSeek) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + var tagStart = state.position; + var tagColumn = state.position - state.lineStart; + if (1 === indentStatus) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + if (1 === indentStatus || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + blockIndent = state.position - state.lineStart; + if (1 === indentStatus) { + if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + } else if (readAlias(state)) { + hasContent = true; + if (null !== state.tag || null !== state.anchor) { + throwError(state, "alias node should not have any properties"); + } + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + if (null === state.tag) { + state.tag = "?"; + } + } + if (null !== state.anchor) { + state.anchorMap[state.anchor] = state.result; + state.result.anchorId = state.anchor; + } + } + } else if (0 === indentStatus) { + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + if (null !== state.tag && "!" !== state.tag) { + if (state.tag == "!include") { + if (!state.result) { + state.result = ast.newScalar(); + state.result.startPosition = state.position; + state.result.endPosition = state.position; + throwError(state, "!include without value"); + } + state.result.kind = ast.Kind.INCLUDE_REF; + } else if ("?" === state.tag) { + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + var vl = state.result["value"]; + if (type.resolve(vl)) { + state.result.valueObject = type.construct(state.result["value"]); + state.tag = type.tag; + if (null !== state.anchor) { + state.result.anchorId = state.anchor; + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (_hasOwnProperty.call(state.typeMap, state.tag)) { + type = state.typeMap[state.tag]; + if (null !== state.result && type.kind !== state.kind) { + throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + if (!type.resolve(state.result)) { + throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag"); + } else { + state.result = type.construct(state.result); + if (null !== state.anchor) { + state.result.anchorId = state.anchor; + state.anchorMap[state.anchor] = state.result; + } + } + } else { + throwErrorFromPosition(state, tagStart, "unknown tag <" + state.tag + ">", false, true); + } + } + return null !== state.tag || null !== state.anchor || hasContent; + } + function readDocument(state) { + var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch; + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = {}; + state.anchorMap = {}; + while (0 !== (ch = state.input.charCodeAt(state.position))) { + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + if (state.lineIndent > 0 || 37 !== ch) { + break; + } + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + if (directiveName.length < 1) { + throwError(state, "directive name must not be less than one character in length"); + } + while (0 !== ch) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + if (35 === ch) { + do { + ch = state.input.charCodeAt(++state.position); + } while (0 !== ch && !is_EOL(ch)); + break; + } + if (is_EOL(ch)) { + break; + } + _position = state.position; + while (0 !== ch && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + directiveArgs.push(state.input.slice(_position, state.position)); + } + if (0 !== ch) { + readLineBreak(state); + } + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + state.position++; + } + } + skipSeparationSpace(state, true, -1); + if (0 === state.lineIndent && 45 === state.input.charCodeAt(state.position) && 45 === state.input.charCodeAt(state.position + 1) && 45 === state.input.charCodeAt(state.position + 2)) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } else if (hasDirectives) { + throwError(state, "directives end mark is expected"); + } + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, "non-ASCII line breaks are interpreted as content"); + } + state.documents.push(state.result); + if (state.position === state.lineStart && testDocumentSeparator(state)) { + if (46 === state.input.charCodeAt(state.position)) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + if (state.position < state.length - 1) { + throwError(state, "end of the stream or a document separator is expected"); + } else { + return; + } + } + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + var inputLength = input.length; + if (inputLength !== 0) { + if (10 !== input.charCodeAt(inputLength - 1) && 13 !== input.charCodeAt(inputLength - 1)) { + input += "\n"; + } + if (input.charCodeAt(0) === 65279) { + input = input.slice(1); + } + } + var state = new State2(input, options); + state.input += "\0"; + while (32 === state.input.charCodeAt(state.position)) { + state.lineIndent += 1; + state.position += 1; + } + while (state.position < state.length - 1) { + var q = state.position; + readDocument(state); + if (state.position <= q) { + for (; state.position < state.length - 1; state.position++) { + var c = state.input.charAt(state.position); + if (c == "\n") { + break; + } + } + } + } + var documents = state.documents; + var docsCount = documents.length; + if (docsCount > 0) { + documents[docsCount - 1].endPosition = inputLength; + } + for (var _i = 0, documents_1 = documents; _i < documents_1.length; _i++) { + var x = documents_1[_i]; + x.errors = state.errors; + if (x.startPosition > x.endPosition) { + x.startPosition = x.endPosition; + } + } + return documents; + } + function loadAll2(input, iterator2, options) { + if (options === void 0) { + options = {}; + } + var documents = loadDocuments(input, options), index, length; + for (index = 0, length = documents.length; index < length; index += 1) { + iterator2(documents[index]); + } + } + exports2.loadAll = loadAll2; + function load2(input, options) { + if (options === void 0) { + options = {}; + } + var documents = loadDocuments(input, options), index, length; + if (0 === documents.length) { + return void 0; + } else if (1 === documents.length) { + return documents[0]; + } + var e = new YAMLException("expected a single document in the stream, but found more"); + e.mark = new Mark2("", "", 0, 0, 0); + e.mark.position = documents[0].endPosition; + documents[0].errors.push(e); + return documents[0]; + } + exports2.load = load2; + function safeLoadAll(input, output, options) { + if (options === void 0) { + options = {}; + } + loadAll2(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + exports2.safeLoadAll = safeLoadAll; + function safeLoad2(input, options) { + if (options === void 0) { + options = {}; + } + return load2(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + exports2.safeLoad = safeLoad2; + module2.exports.loadAll = loadAll2; + module2.exports.load = load2; + module2.exports.safeLoadAll = safeLoadAll; + module2.exports.safeLoad = safeLoad2; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/dumper.js +var require_dumper = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/dumper.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var common = require_common(); + var YAMLException = require_exception(); + var DEFAULT_FULL_SCHEMA = require_default_full(); + var DEFAULT_SAFE_SCHEMA = require_default_safe(); + var _toString3 = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + var CHAR_TAB = 9; + var CHAR_LINE_FEED = 10; + var CHAR_CARRIAGE_RETURN = 13; + var CHAR_SPACE = 32; + var CHAR_EXCLAMATION = 33; + var CHAR_DOUBLE_QUOTE = 34; + var CHAR_SHARP = 35; + var CHAR_PERCENT = 37; + var CHAR_AMPERSAND = 38; + var CHAR_SINGLE_QUOTE = 39; + var CHAR_ASTERISK = 42; + var CHAR_COMMA = 44; + var CHAR_MINUS = 45; + var CHAR_COLON = 58; + var CHAR_GREATER_THAN = 62; + var CHAR_QUESTION = 63; + var CHAR_COMMERCIAL_AT = 64; + var CHAR_LEFT_SQUARE_BRACKET = 91; + var CHAR_RIGHT_SQUARE_BRACKET = 93; + var CHAR_GRAVE_ACCENT = 96; + var CHAR_LEFT_CURLY_BRACKET = 123; + var CHAR_VERTICAL_LINE = 124; + var CHAR_RIGHT_CURLY_BRACKET = 125; + var ESCAPE_SEQUENCES2 = {}; + ESCAPE_SEQUENCES2[0] = "\\0"; + ESCAPE_SEQUENCES2[7] = "\\a"; + ESCAPE_SEQUENCES2[8] = "\\b"; + ESCAPE_SEQUENCES2[9] = "\\t"; + ESCAPE_SEQUENCES2[10] = "\\n"; + ESCAPE_SEQUENCES2[11] = "\\v"; + ESCAPE_SEQUENCES2[12] = "\\f"; + ESCAPE_SEQUENCES2[13] = "\\r"; + ESCAPE_SEQUENCES2[27] = "\\e"; + ESCAPE_SEQUENCES2[34] = '\\"'; + ESCAPE_SEQUENCES2[92] = "\\\\"; + ESCAPE_SEQUENCES2[133] = "\\N"; + ESCAPE_SEQUENCES2[160] = "\\_"; + ESCAPE_SEQUENCES2[8232] = "\\L"; + ESCAPE_SEQUENCES2[8233] = "\\P"; + var DEPRECATED_BOOLEANS_SYNTAX = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" + ]; + function compileStyleMap(schema, map2) { + var result, keys, index, length, tag, style, type; + if (null === map2) { + return {}; + } + result = {}; + keys = Object.keys(map2); + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map2[tag]); + if ("!!" === tag.slice(0, 2)) { + tag = "tag:yaml.org,2002:" + tag.slice(2); + } + type = schema.compiledTypeMap[tag]; + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + result[tag] = style; + } + return result; + } + function encodeHex(character) { + var string, handle, length; + string = character.toString(16).toUpperCase(); + if (character <= 255) { + handle = "x"; + length = 2; + } else if (character <= 65535) { + handle = "u"; + length = 4; + } else if (character <= 4294967295) { + handle = "U"; + length = 8; + } else { + throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF"); + } + return "\\" + handle + common.repeat("0", length - string.length) + string; + } + function State2(options) { + this.schema = options["schema"] || DEFAULT_FULL_SCHEMA; + this.indent = Math.max(1, options["indent"] || 2); + this.skipInvalid = options["skipInvalid"] || false; + this.flowLevel = common.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"]; + this.styleMap = compileStyleMap(this.schema, options["styles"] || null); + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + this.tag = null; + this.result = ""; + this.duplicates = []; + this.usedDuplicates = null; + } + function indentString(string, spaces) { + var ind = common.repeat(" ", spaces), position = 0, next = -1, result = "", line, length = string.length; + while (position < length) { + next = string.indexOf("\n", position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + if (line.length && line !== "\n") { + result += ind; + } + result += line; + } + return result; + } + function generateNextLine(state, level) { + return "\n" + common.repeat(" ", state.indent * level); + } + function testImplicitResolving(state, str2) { + var index, length, type; + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + if (type.resolve(str2)) { + return true; + } + } + return false; + } + function StringBuilder(source) { + this.source = source; + this.result = ""; + this.checkpoint = 0; + } + StringBuilder.prototype.takeUpTo = function(position) { + var er; + if (position < this.checkpoint) { + er = new Error("position should be > checkpoint"); + er.position = position; + er.checkpoint = this.checkpoint; + throw er; + } + this.result += this.source.slice(this.checkpoint, position); + this.checkpoint = position; + return this; + }; + StringBuilder.prototype.escapeChar = function() { + var character, esc; + character = this.source.charCodeAt(this.checkpoint); + esc = ESCAPE_SEQUENCES2[character] || encodeHex(character); + this.result += esc; + this.checkpoint += 1; + return this; + }; + StringBuilder.prototype.finish = function() { + if (this.source.length > this.checkpoint) { + this.takeUpTo(this.source.length); + } + }; + function writeScalar(state, object, level) { + var simple, first, spaceWrap, folded, literal, single, double, sawLineFeed, linePosition, longestLine, indent, max, character, position, escapeSeq, hexEsc, previous, lineLength, modifier, trailingLineBreaks, result; + if (0 === object.length) { + state.dump = "''"; + return; + } + if (object.indexOf("!include") == 0) { + state.dump = "" + object; + return; + } + if (object.indexOf("!$$$novalue") == 0) { + state.dump = ""; + return; + } + if (-1 !== DEPRECATED_BOOLEANS_SYNTAX.indexOf(object)) { + state.dump = "'" + object + "'"; + return; + } + simple = true; + first = object.length ? object.charCodeAt(0) : 0; + spaceWrap = CHAR_SPACE === first || CHAR_SPACE === object.charCodeAt(object.length - 1); + if (CHAR_MINUS === first || CHAR_QUESTION === first || CHAR_COMMERCIAL_AT === first || CHAR_GRAVE_ACCENT === first) { + simple = false; + } + if (spaceWrap) { + simple = false; + folded = false; + literal = false; + } else { + folded = true; + literal = true; + } + single = true; + double = new StringBuilder(object); + sawLineFeed = false; + linePosition = 0; + longestLine = 0; + indent = state.indent * level; + max = 80; + if (indent < 40) { + max -= indent; + } else { + max = 40; + } + for (position = 0; position < object.length; position++) { + character = object.charCodeAt(position); + if (simple) { + if (!simpleChar(character)) { + simple = false; + } else { + continue; + } + } + if (single && character === CHAR_SINGLE_QUOTE) { + single = false; + } + escapeSeq = ESCAPE_SEQUENCES2[character]; + hexEsc = needsHexEscape(character); + if (!escapeSeq && !hexEsc) { + continue; + } + if (character !== CHAR_LINE_FEED && character !== CHAR_DOUBLE_QUOTE && character !== CHAR_SINGLE_QUOTE) { + folded = false; + literal = false; + } else if (character === CHAR_LINE_FEED) { + sawLineFeed = true; + single = false; + if (position > 0) { + previous = object.charCodeAt(position - 1); + if (previous === CHAR_SPACE) { + literal = false; + folded = false; + } + } + if (folded) { + lineLength = position - linePosition; + linePosition = position; + if (lineLength > longestLine) { + longestLine = lineLength; + } + } + } + if (character !== CHAR_DOUBLE_QUOTE) { + single = false; + } + double.takeUpTo(position); + double.escapeChar(); + } + if (simple && testImplicitResolving(state, object)) { + simple = false; + } + modifier = ""; + if (folded || literal) { + trailingLineBreaks = 0; + if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) { + trailingLineBreaks += 1; + if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) { + trailingLineBreaks += 1; + } + } + if (trailingLineBreaks === 0) { + modifier = "-"; + } else if (trailingLineBreaks === 2) { + modifier = "+"; + } + } + if (literal && longestLine < max) { + folded = false; + } + if (!sawLineFeed) { + literal = false; + } + if (simple) { + state.dump = object; + } else if (single) { + state.dump = "'" + object + "'"; + } else if (folded) { + result = fold(object, max); + state.dump = ">" + modifier + "\n" + indentString(result, indent); + } else if (literal) { + if (!modifier) { + object = object.replace(/\n$/, ""); + } + state.dump = "|" + modifier + "\n" + indentString(object, indent); + } else if (double) { + double.finish(); + state.dump = '"' + double.result + '"'; + } else { + throw new Error("Failed to dump scalar value"); + } + return; + } + function fold(object, max) { + var result = "", position = 0, length = object.length, trailing = /\n+$/.exec(object), newLine; + if (trailing) { + length = trailing.index + 1; + } + while (position < length) { + newLine = object.indexOf("\n", position); + if (newLine > length || newLine === -1) { + if (result) { + result += "\n\n"; + } + result += foldLine(object.slice(position, length), max); + position = length; + } else { + if (result) { + result += "\n\n"; + } + result += foldLine(object.slice(position, newLine), max); + position = newLine + 1; + } + } + if (trailing && trailing[0] !== "\n") { + result += trailing[0]; + } + return result; + } + function foldLine(line, max) { + if (line === "") { + return line; + } + var foldRe = /[^\s] [^\s]/g, result = "", prevMatch = 0, foldStart = 0, match2 = foldRe.exec(line), index, foldEnd, folded; + while (match2) { + index = match2.index; + if (index - foldStart > max) { + if (prevMatch !== foldStart) { + foldEnd = prevMatch; + } else { + foldEnd = index; + } + if (result) { + result += "\n"; + } + folded = line.slice(foldStart, foldEnd); + result += folded; + foldStart = foldEnd + 1; + } + prevMatch = index + 1; + match2 = foldRe.exec(line); + } + if (result) { + result += "\n"; + } + if (foldStart !== prevMatch && line.length - foldStart > max) { + result += line.slice(foldStart, prevMatch) + "\n" + line.slice(prevMatch + 1); + } else { + result += line.slice(foldStart); + } + return result; + } + function simpleChar(character) { + return CHAR_TAB !== character && CHAR_LINE_FEED !== character && CHAR_CARRIAGE_RETURN !== character && CHAR_COMMA !== character && CHAR_LEFT_SQUARE_BRACKET !== character && CHAR_RIGHT_SQUARE_BRACKET !== character && CHAR_LEFT_CURLY_BRACKET !== character && CHAR_RIGHT_CURLY_BRACKET !== character && CHAR_SHARP !== character && CHAR_AMPERSAND !== character && CHAR_ASTERISK !== character && CHAR_EXCLAMATION !== character && CHAR_VERTICAL_LINE !== character && CHAR_GREATER_THAN !== character && CHAR_SINGLE_QUOTE !== character && CHAR_DOUBLE_QUOTE !== character && CHAR_PERCENT !== character && CHAR_COLON !== character && !ESCAPE_SEQUENCES2[character] && !needsHexEscape(character); + } + function needsHexEscape(character) { + return !(32 <= character && character <= 126 || 133 === character || 160 <= character && character <= 55295 || 57344 <= character && character <= 65533 || 65536 <= character && character <= 1114111); + } + function writeFlowSequence(state, level, object) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level, object[index], false, false)) { + if (0 !== index) { + _result += ", "; + } + _result += state.dump; + } + } + state.tag = _tag; + state.dump = "[" + _result + "]"; + } + function writeBlockSequence(state, level, object, compact) { + var _result = "", _tag = state.tag, index, length; + for (index = 0, length = object.length; index < length; index += 1) { + if (writeNode(state, level + 1, object[index], true, true)) { + if (!compact || 0 !== index) { + _result += generateNextLine(state, level); + } + _result += "- " + state.dump; + } + } + state.tag = _tag; + state.dump = _result || "[]"; + } + function writeFlowMapping(state, level, object) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (0 !== index) { + pairBuffer += ", "; + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level, objectKey, false, false)) { + continue; + } + if (state.dump.length > 1024) { + pairBuffer += "? "; + } + pairBuffer += state.dump + ": "; + if (!writeNode(state, level, objectValue, false, false)) { + continue; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = "{" + _result + "}"; + } + function writeBlockMapping(state, level, object, compact) { + var _result = "", _tag = state.tag, objectKeyList = Object.keys(object), index, length, objectKey, objectValue, explicitPair, pairBuffer; + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ""; + if (!compact || 0 !== index) { + pairBuffer += generateNextLine(state, level); + } + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + if (!writeNode(state, level + 1, objectKey, true, true)) { + continue; + } + explicitPair = null !== state.tag && "?" !== state.tag || state.dump && state.dump.length > 1024; + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += "?"; + } else { + pairBuffer += "? "; + } + } + pairBuffer += state.dump; + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; + } + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ":"; + } else { + pairBuffer += ": "; + } + pairBuffer += state.dump; + _result += pairBuffer; + } + state.tag = _tag; + state.dump = _result || "{}"; + } + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + typeList = explicit ? state.explicitTypes : state.implicitTypes; + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + if ((type.instanceOf || type.predicate) && (!type.instanceOf || "object" === typeof object && object instanceof type.instanceOf) && (!type.predicate || type.predicate(object))) { + state.tag = explicit ? type.tag : "?"; + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + if ("[object Function]" === _toString3.call(type.represent)) { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException("!<" + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + state.dump = _result; + } + return true; + } + } + return false; + } + function writeNode(state, level, object, block, compact) { + state.tag = null; + state.dump = object; + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + var type = _toString3.call(state.dump); + if (block) { + block = 0 > state.flowLevel || state.flowLevel > level; + } + if (null !== state.tag && "?" !== state.tag || 2 !== state.indent && level > 0) { + compact = false; + } + var objectOrArray = "[object Object]" === type || "[object Array]" === type, duplicateIndex, duplicate; + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = "*ref_" + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if ("[object Object]" === type) { + if (block && 0 !== Object.keys(state.dump).length) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + (0 === level ? "\n" : "") + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if ("[object Array]" === type) { + if (block && 0 !== state.dump.length) { + writeBlockSequence(state, level, state.dump, compact); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + (0 === level ? "\n" : "") + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = "&ref_" + duplicateIndex + " " + state.dump; + } + } + } else if ("[object String]" === type) { + if ("?" !== state.tag) { + writeScalar(state, state.dump, level); + } + } else { + if (state.skipInvalid) { + return false; + } + throw new YAMLException("unacceptable kind of an object to dump " + type); + } + if (null !== state.tag && "?" !== state.tag) { + state.dump = "!<" + state.tag + "> " + state.dump; + } + } + return true; + } + function getDuplicateReferences(object, state) { + var objects = [], duplicatesIndexes = [], index, length; + inspectNode(object, objects, duplicatesIndexes); + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + function inspectNode(object, objects, duplicatesIndexes) { + var type = _toString3.call(object), objectKeyList, index, length; + if (null !== object && "object" === typeof object) { + index = objects.indexOf(object); + if (-1 !== index) { + if (-1 === duplicatesIndexes.indexOf(index)) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + function dump2(input, options) { + options = options || {}; + var state = new State2(options); + getDuplicateReferences(input, state); + if (writeNode(state, 0, input, true, true)) { + return state.dump + "\n"; + } + return ""; + } + exports2.dump = dump2; + function safeDump(input, options) { + return dump2(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options)); + } + exports2.safeDump = safeDump; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/scalarInference.js +var require_scalarInference = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/scalarInference.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function parseYamlBoolean(input) { + if (["true", "True", "TRUE"].lastIndexOf(input) >= 0) { + return true; + } else if (["false", "False", "FALSE"].lastIndexOf(input) >= 0) { + return false; + } + throw 'Invalid boolean "' + input + '"'; + } + exports2.parseYamlBoolean = parseYamlBoolean; + function safeParseYamlInteger(input) { + if (input.lastIndexOf("0o", 0) === 0) { + return parseInt(input.substring(2), 8); + } + return parseInt(input); + } + function parseYamlInteger(input) { + var result = safeParseYamlInteger(input); + if (isNaN(result)) { + throw 'Invalid integer "' + input + '"'; + } + return result; + } + exports2.parseYamlInteger = parseYamlInteger; + function parseYamlFloat(input) { + if ([".nan", ".NaN", ".NAN"].lastIndexOf(input) >= 0) { + return NaN; + } + var infinity = /^([-+])?(?:\.inf|\.Inf|\.INF)$/; + var match2 = infinity.exec(input); + if (match2) { + return match2[1] === "-" ? -Infinity : Infinity; + } + var result = parseFloat(input); + if (!isNaN(result)) { + return result; + } + throw 'Invalid float "' + input + '"'; + } + exports2.parseYamlFloat = parseYamlFloat; + var ScalarType; + (function(ScalarType2) { + ScalarType2[ScalarType2["null"] = 0] = "null"; + ScalarType2[ScalarType2["bool"] = 1] = "bool"; + ScalarType2[ScalarType2["int"] = 2] = "int"; + ScalarType2[ScalarType2["float"] = 3] = "float"; + ScalarType2[ScalarType2["string"] = 4] = "string"; + })(ScalarType = exports2.ScalarType || (exports2.ScalarType = {})); + function determineScalarType(node) { + if (node === void 0) { + return ScalarType.null; + } + if (node.doubleQuoted || !node.plainScalar || node["singleQuoted"]) { + return ScalarType.string; + } + var value = node.value; + if (["null", "Null", "NULL", "~", ""].indexOf(value) >= 0) { + return ScalarType.null; + } + if (value === null || value === void 0) { + return ScalarType.null; + } + if (["true", "True", "TRUE", "false", "False", "FALSE"].indexOf(value) >= 0) { + return ScalarType.bool; + } + var base10 = /^[-+]?[0-9]+$/; + var base8 = /^0o[0-7]+$/; + var base16 = /^0x[0-9a-fA-F]+$/; + if (base10.test(value) || base8.test(value) || base16.test(value)) { + return ScalarType.int; + } + var float2 = /^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$/; + var infinity = /^[-+]?(\.inf|\.Inf|\.INF)$/; + if (float2.test(value) || infinity.test(value) || [".nan", ".NaN", ".NAN"].indexOf(value) >= 0) { + return ScalarType.float; + } + return ScalarType.string; + } + exports2.determineScalarType = determineScalarType; + } +}); + +// npm/node_modules/yaml-ast-parser/dist/src/index.js +var require_src = __commonJS({ + "npm/node_modules/yaml-ast-parser/dist/src/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + Object.defineProperty(exports2, "__esModule", { value: true }); + var loader_1 = require_loader(); + exports2.load = loader_1.load; + exports2.loadAll = loader_1.loadAll; + exports2.safeLoad = loader_1.safeLoad; + exports2.safeLoadAll = loader_1.safeLoadAll; + var dumper_1 = require_dumper(); + exports2.dump = dumper_1.dump; + exports2.safeDump = dumper_1.safeDump; + exports2.YAMLException = require_exception(); + __export2(require_yamlAST()); + __export2(require_scalarInference()); + } +}); + +// npm/node_modules/boundary/lib/index.js +var require_lib3 = __commonJS({ + "npm/node_modules/boundary/lib/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.binarySearch = exports2.upperBound = exports2.lowerBound = exports2.compare = void 0; + function compare(v12, v2) { + return v12 < v2; + } + exports2.compare = compare; + function upperBound(array, value, comp = compare) { + let len = array.length; + let i = 0; + while (len) { + let diff = len >>> 1; + let cursor = i + diff; + if (comp(value, array[cursor])) { + len = diff; + } else { + i = cursor + 1; + len -= diff + 1; + } + } + return i; + } + exports2.upperBound = upperBound; + function lowerBound(array, value, comp = compare) { + let len = array.length; + let i = 0; + while (len) { + let diff = len >>> 1; + let cursor = i + diff; + if (comp(array[cursor], value)) { + i = cursor + 1; + len -= diff + 1; + } else { + len = diff; + } + } + return i; + } + exports2.lowerBound = lowerBound; + function binarySearch(array, value, comp = compare) { + let cursor = lowerBound(array, value, comp); + return cursor !== array.length && !comp(value, array[cursor]); + } + exports2.binarySearch = binarySearch; + } +}); + +// npm/node_modules/structured-source/lib/structured-source.js +var require_structured_source = __commonJS({ + "npm/node_modules/structured-source/lib/structured-source.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.StructuredSource = void 0; + var boundary_1 = require_lib3(); + var StructuredSource2 = class { + /** + * @constructs StructuredSource + * @param {string} source - source code text. + */ + constructor(source) { + this.indice = [0]; + let regexp2 = /[\r\n\u2028\u2029]/g; + const length = source.length; + regexp2.lastIndex = 0; + while (true) { + let result = regexp2.exec(source); + if (!result) { + break; + } + let index = result.index; + if (source.charCodeAt(index) === 13 && source.charCodeAt(index + 1) === 10) { + index += 1; + } + let nextIndex = index + 1; + if (length < nextIndex) { + break; + } + this.indice.push(nextIndex); + regexp2.lastIndex = nextIndex; + } + } + get line() { + return this.indice.length; + } + /** + * @param {SourceLocation} loc - location indicator. + * @return {[ number, number ]} range. + */ + locationToRange(loc) { + return [this.positionToIndex(loc.start), this.positionToIndex(loc.end)]; + } + /** + * @param {[ number, number ]} range - pair of indice. + * @return {SourceLocation} location. + */ + rangeToLocation(range) { + return { + start: this.indexToPosition(range[0]), + end: this.indexToPosition(range[1]) + }; + } + /** + * @param {SourcePosition} pos - position indicator. + * @return {number} index. + */ + positionToIndex(pos) { + let start = this.indice[pos.line - 1]; + return start + pos.column; + } + /** + * @param {number} index - index to the source code. + * @return {SourcePosition} position. + */ + indexToPosition(index) { + const startLine = (0, boundary_1.upperBound)(this.indice, index); + return { + line: startLine, + column: index - this.indice[startLine - 1] + }; + } + }; + exports2.StructuredSource = StructuredSource2; + } +}); + +// npm/src/_dnt.polyfills.ts +if (!Object.hasOwn) { + Object.defineProperty(Object, "hasOwn", { + value: function(object, property) { + if (object == null) { + throw new TypeError("Cannot convert undefined or null to object"); + } + return Object.prototype.hasOwnProperty.call(Object(object), property); + }, + configurable: true, + enumerable: false, + writable: true + }); +} + +// npm/src/post.ts +var import_promises = require("node:timers/promises"); +var import_node_process = __toESM(require("node:process")); +var import_core4 = __toESM(require_core()); +var github = __toESM(require_github()); + +// npm/src/deps/deno.land/std@0.224.0/collections/deep_merge.ts +var { hasOwn } = Object; + +// npm/src/deps/deno.land/std@0.224.0/collections/sum_of.ts +function sumOf(array, selector) { + let sum = 0; + for (const i of array) { + sum += selector(i); + } + return sum; +} + +// npm/node_modules/date-fns/toDate.mjs +function toDate(argument) { + const argStr = Object.prototype.toString.call(argument); + if (argument instanceof Date || typeof argument === "object" && argStr === "[object Date]") { + return new argument.constructor(+argument); + } else if (typeof argument === "number" || argStr === "[object Number]" || typeof argument === "string" || argStr === "[object String]") { + return new Date(argument); + } else { + return /* @__PURE__ */ new Date(NaN); + } +} + +// npm/node_modules/date-fns/constructFrom.mjs +function constructFrom(date, value) { + if (date instanceof Date) { + return new date.constructor(value); + } else { + return new Date(value); + } +} + +// npm/node_modules/date-fns/constants.mjs +var daysInYear = 365.2425; +var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3; +var minTime = -maxTime; +var millisecondsInWeek = 6048e5; +var millisecondsInDay = 864e5; +var secondsInHour = 3600; +var secondsInDay = secondsInHour * 24; +var secondsInWeek = secondsInDay * 7; +var secondsInYear = secondsInDay * daysInYear; +var secondsInMonth = secondsInYear / 12; +var secondsInQuarter = secondsInMonth * 3; + +// npm/node_modules/date-fns/_lib/defaultOptions.mjs +var defaultOptions = {}; +function getDefaultOptions() { + return defaultOptions; +} + +// npm/node_modules/date-fns/startOfWeek.mjs +function startOfWeek(date, options) { + const defaultOptions2 = getDefaultOptions(); + const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0; + const _date = toDate(date); + const day = _date.getDay(); + const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; + _date.setDate(_date.getDate() - diff); + _date.setHours(0, 0, 0, 0); + return _date; +} + +// npm/node_modules/date-fns/startOfISOWeek.mjs +function startOfISOWeek(date) { + return startOfWeek(date, { weekStartsOn: 1 }); +} + +// npm/node_modules/date-fns/getISOWeekYear.mjs +function getISOWeekYear(date) { + const _date = toDate(date); + const year = _date.getFullYear(); + const fourthOfJanuaryOfNextYear = constructFrom(date, 0); + fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); + fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); + const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear); + const fourthOfJanuaryOfThisYear = constructFrom(date, 0); + fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); + fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); + const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear); + if (_date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (_date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +} + +// npm/node_modules/date-fns/startOfDay.mjs +function startOfDay(date) { + const _date = toDate(date); + _date.setHours(0, 0, 0, 0); + return _date; +} + +// npm/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs +function getTimezoneOffsetInMilliseconds(date) { + const _date = toDate(date); + const utcDate = new Date( + Date.UTC( + _date.getFullYear(), + _date.getMonth(), + _date.getDate(), + _date.getHours(), + _date.getMinutes(), + _date.getSeconds(), + _date.getMilliseconds() + ) + ); + utcDate.setUTCFullYear(_date.getFullYear()); + return +date - +utcDate; +} + +// npm/node_modules/date-fns/differenceInCalendarDays.mjs +function differenceInCalendarDays(dateLeft, dateRight) { + const startOfDayLeft = startOfDay(dateLeft); + const startOfDayRight = startOfDay(dateRight); + const timestampLeft = +startOfDayLeft - getTimezoneOffsetInMilliseconds(startOfDayLeft); + const timestampRight = +startOfDayRight - getTimezoneOffsetInMilliseconds(startOfDayRight); + return Math.round((timestampLeft - timestampRight) / millisecondsInDay); +} + +// npm/node_modules/date-fns/startOfISOWeekYear.mjs +function startOfISOWeekYear(date) { + const year = getISOWeekYear(date); + const fourthOfJanuary = constructFrom(date, 0); + fourthOfJanuary.setFullYear(year, 0, 4); + fourthOfJanuary.setHours(0, 0, 0, 0); + return startOfISOWeek(fourthOfJanuary); +} + +// npm/node_modules/date-fns/isDate.mjs +function isDate(value) { + return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]"; +} + +// npm/node_modules/date-fns/isValid.mjs +function isValid(date) { + if (!isDate(date) && typeof date !== "number") { + return false; + } + const _date = toDate(date); + return !isNaN(Number(_date)); +} + +// npm/node_modules/date-fns/startOfYear.mjs +function startOfYear(date) { + const cleanDate = toDate(date); + const _date = constructFrom(date, 0); + _date.setFullYear(cleanDate.getFullYear(), 0, 1); + _date.setHours(0, 0, 0, 0); + return _date; +} + +// npm/node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs +var formatDistanceLocale = { + lessThanXSeconds: { + one: "less than a second", + other: "less than {{count}} seconds" + }, + xSeconds: { + one: "1 second", + other: "{{count}} seconds" + }, + halfAMinute: "half a minute", + lessThanXMinutes: { + one: "less than a minute", + other: "less than {{count}} minutes" + }, + xMinutes: { + one: "1 minute", + other: "{{count}} minutes" + }, + aboutXHours: { + one: "about 1 hour", + other: "about {{count}} hours" + }, + xHours: { + one: "1 hour", + other: "{{count}} hours" + }, + xDays: { + one: "1 day", + other: "{{count}} days" + }, + aboutXWeeks: { + one: "about 1 week", + other: "about {{count}} weeks" + }, + xWeeks: { + one: "1 week", + other: "{{count}} weeks" + }, + aboutXMonths: { + one: "about 1 month", + other: "about {{count}} months" + }, + xMonths: { + one: "1 month", + other: "{{count}} months" + }, + aboutXYears: { + one: "about 1 year", + other: "about {{count}} years" + }, + xYears: { + one: "1 year", + other: "{{count}} years" + }, + overXYears: { + one: "over 1 year", + other: "over {{count}} years" + }, + almostXYears: { + one: "almost 1 year", + other: "almost {{count}} years" + } +}; +var formatDistance = (token, count, options) => { + let result; + const tokenValue = formatDistanceLocale[token]; + if (typeof tokenValue === "string") { + result = tokenValue; + } else if (count === 1) { + result = tokenValue.one; + } else { + result = tokenValue.other.replace("{{count}}", count.toString()); + } + if (options?.addSuffix) { + if (options.comparison && options.comparison > 0) { + return "in " + result; + } else { + return result + " ago"; + } + } + return result; +}; + +// npm/node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs +function buildFormatLongFn(args) { + return (options = {}) => { + const width = options.width ? String(options.width) : args.defaultWidth; + const format2 = args.formats[width] || args.formats[args.defaultWidth]; + return format2; + }; +} + +// npm/node_modules/date-fns/locale/en-US/_lib/formatLong.mjs +var dateFormats = { + full: "EEEE, MMMM do, y", + long: "MMMM do, y", + medium: "MMM d, y", + short: "MM/dd/yyyy" +}; +var timeFormats = { + full: "h:mm:ss a zzzz", + long: "h:mm:ss a z", + medium: "h:mm:ss a", + short: "h:mm a" +}; +var dateTimeFormats = { + full: "{{date}} 'at' {{time}}", + long: "{{date}} 'at' {{time}}", + medium: "{{date}}, {{time}}", + short: "{{date}}, {{time}}" +}; +var formatLong = { + date: buildFormatLongFn({ + formats: dateFormats, + defaultWidth: "full" + }), + time: buildFormatLongFn({ + formats: timeFormats, + defaultWidth: "full" + }), + dateTime: buildFormatLongFn({ + formats: dateTimeFormats, + defaultWidth: "full" + }) +}; + +// npm/node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs +var formatRelativeLocale = { + lastWeek: "'last' eeee 'at' p", + yesterday: "'yesterday at' p", + today: "'today at' p", + tomorrow: "'tomorrow at' p", + nextWeek: "eeee 'at' p", + other: "P" +}; +var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token]; + +// npm/node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs +function buildLocalizeFn(args) { + return (value, options) => { + const context2 = options?.context ? String(options.context) : "standalone"; + let valuesArray; + if (context2 === "formatting" && args.formattingValues) { + const defaultWidth = args.defaultFormattingWidth || args.defaultWidth; + const width = options?.width ? String(options.width) : defaultWidth; + valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth]; + } else { + const defaultWidth = args.defaultWidth; + const width = options?.width ? String(options.width) : args.defaultWidth; + valuesArray = args.values[width] || args.values[defaultWidth]; + } + const index = args.argumentCallback ? args.argumentCallback(value) : value; + return valuesArray[index]; + }; +} + +// npm/node_modules/date-fns/locale/en-US/_lib/localize.mjs +var eraValues = { + narrow: ["B", "A"], + abbreviated: ["BC", "AD"], + wide: ["Before Christ", "Anno Domini"] +}; +var quarterValues = { + narrow: ["1", "2", "3", "4"], + abbreviated: ["Q1", "Q2", "Q3", "Q4"], + wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"] +}; +var monthValues = { + narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], + abbreviated: [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ], + wide: [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] +}; +var dayValues = { + narrow: ["S", "M", "T", "W", "T", "F", "S"], + short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], + abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + wide: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] +}; +var dayPeriodValues = { + narrow: { + am: "a", + pm: "p", + midnight: "mi", + noon: "n", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + }, + abbreviated: { + am: "AM", + pm: "PM", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + }, + wide: { + am: "a.m.", + pm: "p.m.", + midnight: "midnight", + noon: "noon", + morning: "morning", + afternoon: "afternoon", + evening: "evening", + night: "night" + } +}; +var formattingDayPeriodValues = { + narrow: { + am: "a", + pm: "p", + midnight: "mi", + noon: "n", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + }, + abbreviated: { + am: "AM", + pm: "PM", + midnight: "midnight", + noon: "noon", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + }, + wide: { + am: "a.m.", + pm: "p.m.", + midnight: "midnight", + noon: "noon", + morning: "in the morning", + afternoon: "in the afternoon", + evening: "in the evening", + night: "at night" + } +}; +var ordinalNumber = (dirtyNumber, _options) => { + const number = Number(dirtyNumber); + const rem100 = number % 100; + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number + "st"; + case 2: + return number + "nd"; + case 3: + return number + "rd"; + } + } + return number + "th"; +}; +var localize = { + ordinalNumber, + era: buildLocalizeFn({ + values: eraValues, + defaultWidth: "wide" + }), + quarter: buildLocalizeFn({ + values: quarterValues, + defaultWidth: "wide", + argumentCallback: (quarter) => quarter - 1 + }), + month: buildLocalizeFn({ + values: monthValues, + defaultWidth: "wide" + }), + day: buildLocalizeFn({ + values: dayValues, + defaultWidth: "wide" + }), + dayPeriod: buildLocalizeFn({ + values: dayPeriodValues, + defaultWidth: "wide", + formattingValues: formattingDayPeriodValues, + defaultFormattingWidth: "wide" + }) +}; + +// npm/node_modules/date-fns/locale/_lib/buildMatchFn.mjs +function buildMatchFn(args) { + return (string, options = {}) => { + const width = options.width; + const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth]; + const matchResult = string.match(matchPattern); + if (!matchResult) { + return null; + } + const matchedString = matchResult[0]; + const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth]; + const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type + findKey(parsePatterns, (pattern) => pattern.test(matchedString)) + ); + let value; + value = args.valueCallback ? args.valueCallback(key) : key; + value = options.valueCallback ? ( + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type + options.valueCallback(value) + ) : value; + const rest = string.slice(matchedString.length); + return { value, rest }; + }; +} +function findKey(object, predicate) { + for (const key in object) { + if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) { + return key; + } + } + return void 0; +} +function findIndex(array, predicate) { + for (let key = 0; key < array.length; key++) { + if (predicate(array[key])) { + return key; + } + } + return void 0; +} + +// npm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs +function buildMatchPatternFn(args) { + return (string, options = {}) => { + const matchResult = string.match(args.matchPattern); + if (!matchResult) return null; + const matchedString = matchResult[0]; + const parseResult = string.match(args.parsePattern); + if (!parseResult) return null; + let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]; + value = options.valueCallback ? options.valueCallback(value) : value; + const rest = string.slice(matchedString.length); + return { value, rest }; + }; +} + +// npm/node_modules/date-fns/locale/en-US/_lib/match.mjs +var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; +var parseOrdinalNumberPattern = /\d+/i; +var matchEraPatterns = { + narrow: /^(b|a)/i, + abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, + wide: /^(before christ|before common era|anno domini|common era)/i +}; +var parseEraPatterns = { + any: [/^b/i, /^(a|c)/i] +}; +var matchQuarterPatterns = { + narrow: /^[1234]/i, + abbreviated: /^q[1234]/i, + wide: /^[1234](th|st|nd|rd)? quarter/i +}; +var parseQuarterPatterns = { + any: [/1/i, /2/i, /3/i, /4/i] +}; +var matchMonthPatterns = { + narrow: /^[jfmasond]/i, + abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, + wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i +}; +var parseMonthPatterns = { + narrow: [ + /^j/i, + /^f/i, + /^m/i, + /^a/i, + /^m/i, + /^j/i, + /^j/i, + /^a/i, + /^s/i, + /^o/i, + /^n/i, + /^d/i + ], + any: [ + /^ja/i, + /^f/i, + /^mar/i, + /^ap/i, + /^may/i, + /^jun/i, + /^jul/i, + /^au/i, + /^s/i, + /^o/i, + /^n/i, + /^d/i + ] +}; +var matchDayPatterns = { + narrow: /^[smtwf]/i, + short: /^(su|mo|tu|we|th|fr|sa)/i, + abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, + wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i +}; +var parseDayPatterns = { + narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], + any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] +}; +var matchDayPeriodPatterns = { + narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, + any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i +}; +var parseDayPeriodPatterns = { + any: { + am: /^a/i, + pm: /^p/i, + midnight: /^mi/i, + noon: /^no/i, + morning: /morning/i, + afternoon: /afternoon/i, + evening: /evening/i, + night: /night/i + } +}; +var match = { + ordinalNumber: buildMatchPatternFn({ + matchPattern: matchOrdinalNumberPattern, + parsePattern: parseOrdinalNumberPattern, + valueCallback: (value) => parseInt(value, 10) + }), + era: buildMatchFn({ + matchPatterns: matchEraPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseEraPatterns, + defaultParseWidth: "any" + }), + quarter: buildMatchFn({ + matchPatterns: matchQuarterPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseQuarterPatterns, + defaultParseWidth: "any", + valueCallback: (index) => index + 1 + }), + month: buildMatchFn({ + matchPatterns: matchMonthPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseMonthPatterns, + defaultParseWidth: "any" + }), + day: buildMatchFn({ + matchPatterns: matchDayPatterns, + defaultMatchWidth: "wide", + parsePatterns: parseDayPatterns, + defaultParseWidth: "any" + }), + dayPeriod: buildMatchFn({ + matchPatterns: matchDayPeriodPatterns, + defaultMatchWidth: "any", + parsePatterns: parseDayPeriodPatterns, + defaultParseWidth: "any" + }) +}; + +// npm/node_modules/date-fns/locale/en-US.mjs +var enUS = { + code: "en-US", + formatDistance, + formatLong, + formatRelative, + localize, + match, + options: { + weekStartsOn: 0, + firstWeekContainsDate: 1 + } +}; + +// npm/node_modules/date-fns/getDayOfYear.mjs +function getDayOfYear(date) { + const _date = toDate(date); + const diff = differenceInCalendarDays(_date, startOfYear(_date)); + const dayOfYear = diff + 1; + return dayOfYear; +} + +// npm/node_modules/date-fns/getISOWeek.mjs +function getISOWeek(date) { + const _date = toDate(date); + const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date); + return Math.round(diff / millisecondsInWeek) + 1; +} + +// npm/node_modules/date-fns/getWeekYear.mjs +function getWeekYear(date, options) { + const _date = toDate(date); + const year = _date.getFullYear(); + const defaultOptions2 = getDefaultOptions(); + const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; + const firstWeekOfNextYear = constructFrom(date, 0); + firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate); + firstWeekOfNextYear.setHours(0, 0, 0, 0); + const startOfNextYear = startOfWeek(firstWeekOfNextYear, options); + const firstWeekOfThisYear = constructFrom(date, 0); + firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate); + firstWeekOfThisYear.setHours(0, 0, 0, 0); + const startOfThisYear = startOfWeek(firstWeekOfThisYear, options); + if (_date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (_date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +} + +// npm/node_modules/date-fns/startOfWeekYear.mjs +function startOfWeekYear(date, options) { + const defaultOptions2 = getDefaultOptions(); + const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1; + const year = getWeekYear(date, options); + const firstWeek = constructFrom(date, 0); + firstWeek.setFullYear(year, 0, firstWeekContainsDate); + firstWeek.setHours(0, 0, 0, 0); + const _date = startOfWeek(firstWeek, options); + return _date; +} // npm/node_modules/date-fns/getWeek.mjs function getWeek(date, options) { @@ -24383,13 +34204,13 @@ var formatters = { }, // Seconds timestamp t: function(date, token, _localize) { - const timestamp = Math.trunc(date.getTime() / 1e3); - return addLeadingZeros(timestamp, token.length); + const timestamp2 = Math.trunc(date.getTime() / 1e3); + return addLeadingZeros(timestamp2, token.length); }, // Milliseconds timestamp T: function(date, token, _localize) { - const timestamp = date.getTime(); - return addLeadingZeros(timestamp, token.length); + const timestamp2 = date.getTime(); + return addLeadingZeros(timestamp2, token.length); } }; function formatTimezoneShort(offset, delimiter = "") { @@ -24739,7 +34560,116 @@ var createMermaid = (workflow, workflowJobs, options) => { return createGanttDiagrams(title, jobs).join("\n"); }; -// npm/node_modules/@octokit/rest/node_modules/universal-user-agent/index.js +// npm/src/_dnt.shims.ts +var import_shim_deno = __toESM(require_dist2()); +var import_shim_deno2 = __toESM(require_dist2()); +var dntGlobals = { + Deno: import_shim_deno.Deno +}; +var dntGlobalThis = createMergeProxy(globalThis, dntGlobals); +function createMergeProxy(baseObj, extObj) { + return new Proxy(baseObj, { + get(_target, prop, _receiver) { + if (prop in extObj) { + return extObj[prop]; + } else { + return baseObj[prop]; + } + }, + set(_target, prop, value) { + if (prop in extObj) { + delete extObj[prop]; + } + baseObj[prop] = value; + return true; + }, + deleteProperty(_target, prop) { + let success = false; + if (prop in extObj) { + delete extObj[prop]; + success = true; + } + if (prop in baseObj) { + delete baseObj[prop]; + success = true; + } + return success; + }, + ownKeys(_target) { + const baseKeys = Reflect.ownKeys(baseObj); + const extKeys = Reflect.ownKeys(extObj); + const extKeysSet = new Set(extKeys); + return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys]; + }, + defineProperty(_target, prop, desc) { + if (prop in extObj) { + delete extObj[prop]; + } + Reflect.defineProperty(baseObj, prop, desc); + return true; + }, + getOwnPropertyDescriptor(_target, prop) { + if (prop in extObj) { + return Reflect.getOwnPropertyDescriptor(extObj, prop); + } else { + return Reflect.getOwnPropertyDescriptor(baseObj, prop); + } + }, + has(_target, prop) { + return prop in extObj || prop in baseObj; + } + }); +} + +// npm/src/deps/jsr.io/@std/encoding/1.0.0/_validate_binary_like.ts +var encoder = new TextEncoder(); + +// npm/src/deps/jsr.io/@std/encoding/1.0.0/base32.ts +var lookup = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""); +var revLookup = []; +lookup.forEach((c, i) => revLookup[c.charCodeAt(0)] = i); + +// npm/src/deps/jsr.io/@std/encoding/1.0.0/base58.ts +var base58alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""); + +// npm/src/deps/jsr.io/@std/encoding/1.0.0/base64.ts +function decodeBase64(b64) { + const binString = atob(b64); + const size = binString.length; + const bytes = new Uint8Array(size); + for (let i = 0; i < size; i++) { + bytes[i] = binString.charCodeAt(i); + } + return bytes; +} + +// npm/src/deps/jsr.io/@std/encoding/1.0.0/hex.ts +var hexTable = new TextEncoder().encode("0123456789abcdef"); +var textEncoder = new TextEncoder(); +var textDecoder = new TextDecoder(); + +// npm/src/deps/jsr.io/@std/encoding/1.0.0/varint.ts +var AB = new ArrayBuffer(8); +var U32_VIEW = new Uint32Array(AB); +var U64_VIEW = new BigUint64Array(AB); + +// npm/src/deps/jsr.io/@std/collections/1.0.2/chunk.ts +function chunk(array, size) { + if (size <= 0 || !Number.isInteger(size)) { + throw new RangeError( + `Expected size to be an integer greater than 0 but found ${size}` + ); + } + const result = []; + let index = 0; + while (index < array.length) { + result.push(array.slice(index, index + size)); + index += size; + } + return result; +} + +// npm/node_modules/universal-user-agent/index.js function getUserAgent() { if (typeof navigator === "object" && "userAgent" in navigator) { return navigator.userAgent; @@ -24750,7 +34680,7 @@ function getUserAgent() { return ""; } -// npm/node_modules/@octokit/rest/node_modules/before-after-hook/lib/register.js +// npm/node_modules/before-after-hook/lib/register.js function register(state, name, method, options) { if (typeof method !== "function") { throw new Error("method for before hook must be a function"); @@ -24773,7 +34703,7 @@ function register(state, name, method, options) { }); } -// npm/node_modules/@octokit/rest/node_modules/before-after-hook/lib/add.js +// npm/node_modules/before-after-hook/lib/add.js function addHook(state, kind, name, hook2) { const orig = hook2; if (!state.registry[name]) { @@ -24808,7 +34738,7 @@ function addHook(state, kind, name, hook2) { }); } -// npm/node_modules/@octokit/rest/node_modules/before-after-hook/lib/remove.js +// npm/node_modules/before-after-hook/lib/remove.js function removeHook(state, name, method) { if (!state.registry[name]) { return; @@ -24822,7 +34752,7 @@ function removeHook(state, name, method) { state.registry[name].splice(index, 1); } -// npm/node_modules/@octokit/rest/node_modules/before-after-hook/index.js +// npm/node_modules/before-after-hook/index.js var bind = Function.bind; var bindable = bind.bind(bind); function bindApi(hook2, state, name) { @@ -24856,7 +34786,7 @@ function Collection() { } var before_after_hook_default = { Singular, Collection }; -// npm/node_modules/@octokit/rest/node_modules/@octokit/endpoint/dist-bundle/index.js +// npm/node_modules/@octokit/endpoint/dist-bundle/index.js var VERSION = "0.0.0-development"; var userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; var DEFAULTS = { @@ -24966,16 +34896,16 @@ function omit(object, keysToOmit) { } return result; } -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { +function encodeReserved(str2) { + return str2.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { if (!/%[0-9A-Fa-f]/.test(part)) { part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); } return part; }).join(""); } -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { +function encodeUnreserved(str2) { + return encodeURIComponent(str2).replace(/[!'()*]/g, function(c) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } @@ -25174,7 +35104,7 @@ function withDefaults(oldDefaults, newDefaults) { } var endpoint = withDefaults(null, DEFAULTS); -// npm/node_modules/@octokit/rest/node_modules/@octokit/request-error/dist-src/index.js +// npm/node_modules/@octokit/request-error/dist-src/index.js var RequestError = class extends Error { name; /** @@ -25213,7 +35143,7 @@ var RequestError = class extends Error { } }; -// npm/node_modules/@octokit/rest/node_modules/@octokit/request/dist-bundle/index.js +// npm/node_modules/@octokit/request/dist-bundle/index.js var VERSION2 = "0.0.0-development"; var defaults_default = { headers: { @@ -25374,7 +35304,7 @@ function withDefaults2(oldEndpoint, newDefaults) { } var request = withDefaults2(endpoint, defaults_default); -// npm/node_modules/@octokit/rest/node_modules/@octokit/graphql/dist-bundle/index.js +// npm/node_modules/@octokit/graphql/dist-bundle/index.js var VERSION3 = "0.0.0-development"; function _buildMessageForResponseErrors(data) { return `Request failed due to following response errors: @@ -25481,7 +35411,7 @@ function withCustomRequest(customRequest) { }); } -// npm/node_modules/@octokit/rest/node_modules/@octokit/auth-token/dist-bundle/index.js +// npm/node_modules/@octokit/auth-token/dist-bundle/index.js var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; var REGEX_IS_INSTALLATION = /^ghs_/; var REGEX_IS_USER_TO_SERVER = /^ghu_/; @@ -25525,10 +35455,10 @@ var createTokenAuth = function createTokenAuth2(token) { }); }; -// npm/node_modules/@octokit/rest/node_modules/@octokit/core/dist-src/version.js +// npm/node_modules/@octokit/core/dist-src/version.js var VERSION4 = "6.1.2"; -// npm/node_modules/@octokit/rest/node_modules/@octokit/core/dist-src/index.js +// npm/node_modules/@octokit/core/dist-src/index.js var noop = () => { }; var consoleWarn = console.warn.bind(console); @@ -25655,10 +35585,10 @@ var Octokit = class { auth; }; -// npm/node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log/dist-src/version.js +// npm/node_modules/@octokit/plugin-request-log/dist-src/version.js var VERSION5 = "5.3.1"; -// npm/node_modules/@octokit/rest/node_modules/@octokit/plugin-request-log/dist-src/index.js +// npm/node_modules/@octokit/plugin-request-log/dist-src/index.js function requestLog(octokit) { octokit.hook.wrap("request", (request2, options) => { octokit.log.debug("request", options); @@ -25682,7 +35612,7 @@ function requestLog(octokit) { } requestLog.VERSION = VERSION5; -// npm/node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js +// npm/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.js var VERSION6 = "0.0.0-development"; function normalizePaginatedListResponse(response) { if (!response.data) { @@ -25785,10 +35715,10 @@ function paginateRest(octokit) { } paginateRest.VERSION = VERSION6; -// npm/node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js +// npm/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js var VERSION7 = "13.2.4"; -// npm/node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js +// npm/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js var Endpoints = { actions: { addCustomLabelsToSelfHostedRunnerForOrg: [ @@ -27727,218 +37657,1475 @@ var Endpoints = { updateAuthenticated: ["PATCH /user"] } }; -var endpoints_default = Endpoints; +var endpoints_default = Endpoints; + +// npm/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js +var endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint2] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint2; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { + method, + url + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); + } +} +var handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); + } + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); + } + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + function withDecorations(...args) { + let options = requestWithDefaults.endpoint.merge(...args); + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: void 0 + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; + } + delete options2[name]; + } + } + return requestWithDefaults(options2); + } + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} -// npm/node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js -var endpointMethodsMap = /* @__PURE__ */ new Map(); -for (const [scope, endpoints] of Object.entries(endpoints_default)) { - for (const [methodName, endpoint2] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint2; - const [method, url] = route.split(/ /); - const endpointDefaults = Object.assign( +// npm/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + rest: api + }; +} +restEndpointMethods.VERSION = VERSION7; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit); + return { + ...api, + rest: api + }; +} +legacyRestEndpointMethods.VERSION = VERSION7; + +// npm/node_modules/@octokit/rest/dist-src/version.js +var VERSION8 = "21.0.2"; + +// npm/node_modules/@octokit/rest/dist-src/index.js +var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRest).defaults( + { + userAgent: `octokit-rest.js/${VERSION8}` + } +); + +// npm/node_modules/@octokit/plugin-throttling/dist-bundle/index.js +var import_light = __toESM(require_light(), 1); +var VERSION9 = "0.0.0-development"; +var noop2 = () => Promise.resolve(); +function wrapRequest(state, request2, options) { + return state.retryLimiter.schedule(doRequest, state, request2, options); +} +async function doRequest(state, request2, options) { + const isWrite = options.method !== "GET" && options.method !== "HEAD"; + const { pathname } = new URL(options.url, "http://github.test"); + const isSearch = options.method === "GET" && pathname.startsWith("/search/"); + const isGraphQL = pathname.startsWith("/graphql"); + const retryCount = ~~request2.retryCount; + const jobOptions = retryCount > 0 ? { priority: 0, weight: 0 } : {}; + if (state.clustering) { + jobOptions.expiration = 1e3 * 60; + } + if (isWrite || isGraphQL) { + await state.write.key(state.id).schedule(jobOptions, noop2); + } + if (isWrite && state.triggersNotification(pathname)) { + await state.notifications.key(state.id).schedule(jobOptions, noop2); + } + if (isSearch) { + await state.search.key(state.id).schedule(jobOptions, noop2); + } + const req = state.global.key(state.id).schedule(jobOptions, request2, options); + if (isGraphQL) { + const res = await req; + if (res.data.errors != null && res.data.errors.some((error) => error.type === "RATE_LIMITED")) { + const error = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { + response: res, + data: res.data + }); + throw error; + } + } + return req; +} +var triggers_notification_paths_default = [ + "/orgs/{org}/invitations", + "/orgs/{org}/invitations/{invitation_id}", + "/orgs/{org}/teams/{team_slug}/discussions", + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "/repos/{owner}/{repo}/collaborators/{username}", + "/repos/{owner}/{repo}/commits/{commit_sha}/comments", + "/repos/{owner}/{repo}/issues", + "/repos/{owner}/{repo}/issues/{issue_number}/comments", + "/repos/{owner}/{repo}/pulls", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments", + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", + "/repos/{owner}/{repo}/pulls/{pull_number}/merge", + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "/repos/{owner}/{repo}/releases", + "/teams/{team_id}/discussions", + "/teams/{team_id}/discussions/{discussion_number}/comments" +]; +function routeMatcher(paths) { + const regexes = paths.map( + (path) => path.split("/").map((c) => c.startsWith("{") ? "(?:.+?)" : c).join("/") + ); + const regex2 = `^(?:${regexes.map((r) => `(?:${r})`).join("|")})[^/]*$`; + return new RegExp(regex2, "i"); +} +var regex = routeMatcher(triggers_notification_paths_default); +var triggersNotification = regex.test.bind(regex); +var groups = {}; +var createGroups = function(Bottleneck2, common) { + groups.global = new Bottleneck2.Group({ + id: "octokit-global", + maxConcurrent: 10, + ...common + }); + groups.search = new Bottleneck2.Group({ + id: "octokit-search", + maxConcurrent: 1, + minTime: 2e3, + ...common + }); + groups.write = new Bottleneck2.Group({ + id: "octokit-write", + maxConcurrent: 1, + minTime: 1e3, + ...common + }); + groups.notifications = new Bottleneck2.Group({ + id: "octokit-notifications", + maxConcurrent: 1, + minTime: 3e3, + ...common + }); +}; +function throttling(octokit, octokitOptions) { + const { + enabled = true, + Bottleneck: Bottleneck2 = import_light.default, + id = "no-id", + timeout = 1e3 * 60 * 2, + // Redis TTL: 2 minutes + connection + } = octokitOptions.throttle || {}; + if (!enabled) { + return {}; + } + const common = { connection, timeout }; + if (groups.global == null) { + createGroups(Bottleneck2, common); + } + const state = Object.assign( + { + clustering: connection != null, + triggersNotification, + fallbackSecondaryRateRetryAfter: 60, + retryAfterBaseValue: 1e3, + retryLimiter: new Bottleneck2(), + id, + ...groups + }, + octokitOptions.throttle + ); + if (typeof state.onSecondaryRateLimit !== "function" || typeof state.onRateLimit !== "function") { + throw new Error(`octokit/plugin-throttling error: + You must pass the onSecondaryRateLimit and onRateLimit error handlers. + See https://octokit.github.io/rest.js/#throttling + + const octokit = new Octokit({ + throttle: { + onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, + onRateLimit: (retryAfter, options) => {/* ... */} + } + }) + `); + } + const events = {}; + const emitter = new Bottleneck2.Events(events); + events.on("secondary-limit", state.onSecondaryRateLimit); + events.on("rate-limit", state.onRateLimit); + events.on( + "error", + (e) => octokit.log.warn("Error in throttling-plugin limit handler", e) + ); + state.retryLimiter.on("failed", async function(error, info2) { + const [state2, request2, options] = info2.args; + const { pathname } = new URL(options.url, "http://github.test"); + const shouldRetryGraphQL = pathname.startsWith("/graphql") && error.status !== 401; + if (!(shouldRetryGraphQL || error.status === 403)) { + return; + } + const retryCount = ~~request2.retryCount; + request2.retryCount = retryCount; + options.request.retryCount = retryCount; + const { wantRetry, retryAfter = 0 } = await async function() { + if (/\bsecondary rate\b/i.test(error.message)) { + const retryAfter2 = Number(error.response.headers["retry-after"]) || state2.fallbackSecondaryRateRetryAfter; + const wantRetry2 = await emitter.trigger( + "secondary-limit", + retryAfter2, + options, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + } + if (error.response.headers != null && error.response.headers["x-ratelimit-remaining"] === "0" || (error.response.data?.errors ?? []).some( + (error2) => error2.type === "RATE_LIMITED" + )) { + const rateLimitReset = new Date( + ~~error.response.headers["x-ratelimit-reset"] * 1e3 + ).getTime(); + const retryAfter2 = Math.max( + // Add one second so we retry _after_ the reset time + // https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#exceeding-the-rate-limit + Math.ceil((rateLimitReset - Date.now()) / 1e3) + 1, + 0 + ); + const wantRetry2 = await emitter.trigger( + "rate-limit", + retryAfter2, + options, + octokit, + retryCount + ); + return { wantRetry: wantRetry2, retryAfter: retryAfter2 }; + } + return {}; + }(); + if (wantRetry) { + request2.retryCount++; + return retryAfter * state2.retryAfterBaseValue; + } + }); + octokit.hook.wrap("request", wrapRequest.bind(null, state)); + return {}; +} +throttling.VERSION = VERSION9; +throttling.triggersNotification = triggersNotification; + +// npm/node_modules/@octokit/plugin-retry/dist-bundle/index.js +var import_light2 = __toESM(require_light(), 1); +async function errorRequest(state, octokit, error, options) { + if (!error.request || !error.request.request) { + throw error; + } + if (error.status >= 400 && !state.doNotRetry.includes(error.status)) { + const retries = options.request.retries != null ? options.request.retries : state.retries; + const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); + throw octokit.retry.retryRequest(error, retries, retryAfter); + } + throw error; +} +async function wrapRequest2(state, octokit, request2, options) { + const limiter = new import_light2.default(); + limiter.on("failed", function(error, info2) { + const maxRetries = ~~error.request.request.retries; + const after = ~~error.request.request.retryAfter; + options.request.retryCount = info2.retryCount + 1; + if (maxRetries > info2.retryCount) { + return after * state.retryAfterBaseValue; + } + }); + return limiter.schedule( + requestWithGraphqlErrorHandling.bind(null, state, octokit, request2), + options + ); +} +async function requestWithGraphqlErrorHandling(state, octokit, request2, options) { + const response = await request2(request2, options); + if (response.data && response.data.errors && /Something went wrong while executing your query/.test( + response.data.errors[0].message + )) { + const error = new RequestError(response.data.errors[0].message, 500, { + request: options, + response + }); + return errorRequest(state, octokit, error, options); + } + return response; +} +var VERSION10 = "0.0.0-development"; +function retry(octokit, octokitOptions) { + const state = Object.assign( + { + enabled: true, + retryAfterBaseValue: 1e3, + doNotRetry: [400, 401, 403, 404, 422, 451], + retries: 3 + }, + octokitOptions.retry + ); + if (state.enabled) { + octokit.hook.error("request", errorRequest.bind(null, state, octokit)); + octokit.hook.wrap("request", wrapRequest2.bind(null, state, octokit)); + } + return { + retry: { + retryRequest: (error, retries, retryAfter) => { + error.request.request = Object.assign({}, error.request.request, { + retries, + retryAfter + }); + return error; + } + } + }; +} +retry.VERSION = VERSION10; + +// npm/src/deps/jsr.io/@kesin11/gha-utils/0.1.0/api_client/api_client.ts +var FileContent = class { + raw; + content; + constructor(getContentResponse) { + this.raw = getContentResponse; + const textDecoder2 = new TextDecoder(); + this.content = textDecoder2.decode(decodeBase64(getContentResponse.content)); + } +}; +var Github = class _Github { + octokit; + token; + baseUrl; + isGHES; + contentCache = /* @__PURE__ */ new Map(); + constructor(options) { + this.baseUrl = _Github.getBaseUrl(options?.host); + this.isGHES = this.baseUrl !== "https://api.github.com"; + this.token = options?.token ?? import_shim_deno2.Deno.env.get("GITHUB_TOKEN") ?? void 0; + const MyOctokit = options?._workaroundDenoTest ? Octokit2.plugin(retry) : Octokit2.plugin(throttling, retry); + this.octokit = new MyOctokit({ + auth: this.token, + baseUrl: this.baseUrl, + log: options?.debug ? console : void 0, + throttle: { + onRateLimit: (retryAfter, options2, _octokit, retryCount) => { + this.octokit.log.warn( + `Request quota exhausted for request ${options2.method} ${options2.url}` + ); + if (retryCount <= 2) { + console.warn(`Retrying after ${retryAfter} seconds!`); + return true; + } + }, + onSecondaryRateLimit: (_retryAfter, options2, _octokit, _retryCount) => { + console.warn( + `Abuse detected for request ${options2.method} ${options2.url}` + ); + } + } + }); + } + static getBaseUrl(host) { + if (host) { + return host.startsWith("https://") ? `${host}/api/v3` : `https://${host}/api/v3`; + } else if (import_shim_deno2.Deno.env.get("GITHUB_API_URL")) { + return import_shim_deno2.Deno.env.get("GITHUB_API_URL"); + } else { + return "https://api.github.com"; + } + } + async fetchRepository(owner, repo) { + const res = await this.octokit.repos.get({ + owner, + repo + }); + return res.data; + } + // NOTE: このリクエスト数はworkflowRunsの数とイコールなので100を余裕で超えてしまう + // 本来はFetch APIなどhttpクライアント側でリクエスト数制限をかけるべきだが、Denoだと方法が分からない + // chunk数で並列数を制限してキャッシュを活用することでAPIリクエスト数を抑える + async fetchWorkflowRunUsages(workflowRuns, chunkSize = 20) { + if (this.isGHES) return void 0; + const workflowRunsChunks = chunk(workflowRuns, chunkSize); + const workflowRunsUsages = []; + for (const chunk2 of workflowRunsChunks) { + const promises = chunk2.map((run) => { + return this.octokit.actions.getWorkflowRunUsage({ + owner: run.repository.owner.login, + repo: run.repository.name, + run_id: run.id + }); + }); + const chunkResults = (await Promise.all(promises)).map((res) => res.data); + workflowRunsUsages.push(...chunkResults); + } + return workflowRunsUsages; + } + // NOTE: This is a cacheable API; the run_id and attempt_number pairs ensure consistent results. + // NOTE: このリクエスト数はworkflowRunsの数とイコールなので100を余裕で超えてしまう + // 本来はFetch APIなどhttpクライアント側でリクエスト数制限をかけるべきだが、Denoだと方法が分からない + // chunk数で並列数を制限してキャッシュを活用することでAPIリクエスト数を抑える + async fetchWorkflowJobs(workflowRuns, chunkSize = 20) { + const workflowJobs = []; + const workflowJobsChunks = chunk(workflowRuns, chunkSize); + for (const chunk2 of workflowJobsChunks) { + const promises = chunk2.map((run) => { + return this.octokit.actions.listJobsForWorkflowRunAttempt({ + owner: run.repository.owner.login, + repo: run.repository.name, + run_id: run.id, + attempt_number: run.run_attempt ?? 1 + }); + }); + const chunkResults = (await Promise.all(promises)).map( + (res) => res.data.jobs + ); + workflowJobs.push(...chunkResults.flat()); + } + return workflowJobs; + } + async fetchWorkflowRuns(owner, repo, branch) { + const res = await this.octokit.actions.listWorkflowRunsForRepo( { - method, - url - }, - defaults + owner, + repo, + per_page: 100, + // MAX per_page num + branch + } ); - if (!endpointMethodsMap.has(scope)) { - endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + return res.data.workflow_runs.filter((run) => run.event !== "dynamic"); + } + async fetchWorkflowRun(owner, repo, runId, runAttempt) { + if (runAttempt) { + const res = await this.octokit.actions.getWorkflowRunAttempt({ + owner, + repo, + run_id: runId, + attempt_number: runAttempt + }); + return res.data; + } else { + const res = await this.octokit.actions.getWorkflowRun({ + owner, + repo, + run_id: runId + }); + return res.data; + } + } + async fetchWorkflowRunsWithCreated(owner, repo, created, branch) { + const workflowRuns = await this.octokit.paginate( + this.octokit.actions.listWorkflowRunsForRepo, + { + owner, + repo, + created, + per_page: 100, + // MAX per_page num + branch + } + ); + return workflowRuns.filter((run) => run.event !== "dynamic"); + } + async fetchActionsCacheUsage(owner, repo) { + const res = await this.octokit.actions.getActionsCacheUsage({ + owner, + repo + }); + return res.data; + } + async fetchActionsCacheList(owner, repo, perPage = 100) { + const res = await this.octokit.actions.getActionsCacheList({ + owner, + repo, + sort: "size_in_bytes", + per_page: perPage + }); + return res.data; + } + async fetchWorkflowFiles(workflowRuns) { + const promises = workflowRuns.map((workflowRun) => { + return this.fetchContent({ + owner: workflowRun.repository.owner.login, + repo: workflowRun.repository.name, + path: workflowRun.path, + ref: workflowRun.head_sha + }); + }); + return await Promise.all(promises); + } + // NOTE: このリクエスト数はworkflowRunsの数とイコールなので100を余裕で超えてしまう + // fetchContent自体を並列に呼び出すとキャッシュにセットする前に次のリクエストが来る可能性があり、実質あまりキャッシュできていない + // 本来はFetch APIなどhttpクライアント側でリクエスト数制限をかけるべきだが、Denoだと方法が分からない + // chunk数で並列数を制限してキャッシュを活用することでAPIリクエスト数を抑える + async fetchWorkflowFilesByRef(workflowRuns, ref, chunkSize = 20) { + const workflowRunsChunks = chunk(workflowRuns, chunkSize); + const results = []; + for (const chunk2 of workflowRunsChunks) { + const chunkResults = await Promise.all(chunk2.map((workflowRun) => { + return this.fetchContent({ + owner: workflowRun.repository.owner.login, + repo: workflowRun.repository.name, + path: workflowRun.path, + ref + }); + })); + results.push(...chunkResults); + } + return results; + } + // NOTE: This is a cacheable API if ref is a commit hash; it is also cacheable if ref is a branch, as long as it is short-lived. + // deno-lint-ignore require-await + async fetchContent(params) { + const cache = this.contentCache.get(JSON.stringify(params)); + if (cache) return cache; + return this.octokit.repos.getContent({ + owner: params.owner, + repo: params.repo, + path: params.path, + ref: params.ref + }).then((res) => { + if (!Array.isArray(res.data) && res.data.type === "file") { + const fetchedFileContent = new FileContent(res.data); + this.contentCache.set(JSON.stringify(params), fetchedFileContent); + return fetchedFileContent; + } + }).catch((_error) => { + console.warn( + `fetchContent not found: ref: ${params.ref}, path: ${params.owner}/${params.repo}/${params.path}` + ); + return void 0; + }); + } +}; + +// npm/src/deps/jsr.io/@kesin11/gha-utils/0.1.0/workflow_model/src/workflow_ast.ts +var import_yaml_ast_parser = __toESM(require_src()); +var import_structured_source = __toESM(require_structured_source()); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_error.ts +var YAMLError = class extends Error { + constructor(message2 = "(unknown reason)", mark = "") { + super(`${message2} ${mark}`); + this.mark = mark; + this.name = this.constructor.name; + } + toString() { + return `${this.name}: ${this.message} ${this.mark}`; + } +}; + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_utils.ts +function isBoolean(value) { + return typeof value === "boolean" || value instanceof Boolean; +} +function isNegativeZero(i) { + return i === 0 && Number.NEGATIVE_INFINITY === 1 / i; +} + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/schema.ts +function compileList(schema, name, result) { + const exclude = []; + for (const includedSchema of schema.include) { + result = compileList(includedSchema, name, result); + } + for (const currentType of schema[name]) { + for (const [previousIndex, previousType] of result.entries()) { + if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) { + exclude.push(previousIndex); + } + } + result.push(currentType); + } + return result.filter((_type, index) => !exclude.includes(index)); +} +function compileMap(...typesList) { + const result = { + fallback: {}, + mapping: {}, + scalar: {}, + sequence: {} + }; + for (const types of typesList) { + for (const type of types) { + if (type.kind !== null) { + result[type.kind][type.tag] = result["fallback"][type.tag] = type; + } + } + } + return result; +} +var Schema = class _Schema { + static SCHEMA_DEFAULT; + implicit; + explicit; + include; + compiledImplicit; + compiledExplicit; + compiledTypeMap; + constructor(definition) { + this.explicit = definition.explicit || []; + this.implicit = definition.implicit || []; + this.include = definition.include || []; + for (const type of this.implicit) { + if (type.loadKind && type.loadKind !== "scalar") { + throw new YAMLError( + "There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported." + ); + } + } + this.compiledImplicit = compileList(this, "implicit", []); + this.compiledExplicit = compileList(this, "explicit", []); + this.compiledTypeMap = compileMap( + this.compiledImplicit, + this.compiledExplicit + ); + } + /* Returns a new extended schema from current schema */ + extend(definition) { + return new _Schema({ + implicit: [ + .../* @__PURE__ */ new Set([...this.implicit, ...definition?.implicit ?? []]) + ], + explicit: [ + .../* @__PURE__ */ new Set([...this.explicit, ...definition?.explicit ?? []]) + ], + include: [.../* @__PURE__ */ new Set([...this.include, ...definition?.include ?? []])] + }); + } + static create() { + } +}; + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/type.ts +function checkTagFormat(tag) { + return tag; +} +var Type = class { + tag; + kind = null; + instanceOf; + predicate; + represent; + defaultStyle; + styleAliases; + loadKind; + constructor(tag, options) { + this.tag = checkTagFormat(tag); + if (options) { + this.kind = options.kind; + this.resolve = options.resolve || (() => true); + this.construct = options.construct || ((data) => data); + this.instanceOf = options.instanceOf; + this.predicate = options.predicate; + this.represent = options.represent; + this.defaultStyle = options.defaultStyle; + this.styleAliases = options.styleAliases; + } + } + resolve = () => true; + construct = (data) => data; +}; + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/binary.ts +var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r"; +function resolveYamlBinary(data) { + if (data === null) return false; + let code; + let bitlen = 0; + const max = data.length; + const map2 = BASE64_MAP; + for (let idx = 0; idx < max; idx++) { + code = map2.indexOf(data.charAt(idx)); + if (code > 64) continue; + if (code < 0) return false; + bitlen += 6; + } + return bitlen % 8 === 0; +} +function constructYamlBinary(data) { + const input = data.replace(/[\r\n=]/g, ""); + const max = input.length; + const map2 = BASE64_MAP; + const result = []; + let bits = 0; + for (let idx = 0; idx < max; idx++) { + if (idx % 4 === 0 && idx) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } + bits = bits << 6 | map2.indexOf(input.charAt(idx)); + } + const tailbits = max % 4 * 6; + if (tailbits === 0) { + result.push(bits >> 16 & 255); + result.push(bits >> 8 & 255); + result.push(bits & 255); + } else if (tailbits === 18) { + result.push(bits >> 10 & 255); + result.push(bits >> 2 & 255); + } else if (tailbits === 12) { + result.push(bits >> 4 & 255); + } + return new Uint8Array(result); +} +function representYamlBinary(object) { + const max = object.length; + const map2 = BASE64_MAP; + let result = ""; + let bits = 0; + for (let idx = 0; idx < max; idx++) { + if (idx % 3 === 0 && idx) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } + bits = (bits << 8) + object[idx]; + } + const tail = max % 3; + if (tail === 0) { + result += map2[bits >> 18 & 63]; + result += map2[bits >> 12 & 63]; + result += map2[bits >> 6 & 63]; + result += map2[bits & 63]; + } else if (tail === 2) { + result += map2[bits >> 10 & 63]; + result += map2[bits >> 4 & 63]; + result += map2[bits << 2 & 63]; + result += map2[64]; + } else if (tail === 1) { + result += map2[bits >> 2 & 63]; + result += map2[bits << 4 & 63]; + result += map2[64]; + result += map2[64]; + } + return result; +} +function isBinary(obj) { + return obj instanceof Uint8Array; +} +var binary = new Type("tag:yaml.org,2002:binary", { + construct: constructYamlBinary, + kind: "scalar", + predicate: isBinary, + represent: representYamlBinary, + resolve: resolveYamlBinary +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/bool.ts +function resolveYamlBoolean(data) { + const max = data.length; + return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE"); +} +function constructYamlBoolean(data) { + return data === "true" || data === "True" || data === "TRUE"; +} +var bool = new Type("tag:yaml.org,2002:bool", { + construct: constructYamlBoolean, + defaultStyle: "lowercase", + kind: "scalar", + predicate: isBoolean, + represent: { + lowercase(object) { + return object ? "true" : "false"; + }, + uppercase(object) { + return object ? "TRUE" : "FALSE"; + }, + camelcase(object) { + return object ? "True" : "False"; } - endpointMethodsMap.get(scope).set(methodName, { - scope, - methodName, - endpointDefaults, - decorations + }, + resolve: resolveYamlBoolean +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/float.ts +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" +); +function resolveYamlFloat(data) { + if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === "_") { + return false; + } + return true; +} +function constructYamlFloat(data) { + let value = data.replace(/_/g, "").toLowerCase(); + const sign = value[0] === "-" ? -1 : 1; + const digits = []; + if (value[0] && "+-".indexOf(value[0]) >= 0) { + value = value.slice(1); + } + if (value === ".inf") { + return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + } + if (value === ".nan") { + return NaN; + } + if (value.indexOf(":") >= 0) { + value.split(":").forEach((v) => { + digits.unshift(parseFloat(v)); }); + let valueNb = 0; + let base = 1; + digits.forEach((d) => { + valueNb += d * base; + base *= 60; + }); + return sign * valueNb; } + return sign * parseFloat(value); } -var handler = { - has({ scope }, methodName) { - return endpointMethodsMap.get(scope).has(methodName); - }, - getOwnPropertyDescriptor(target, methodName) { - return { - value: this.get(target, methodName), - // ensures method is in the cache - configurable: true, - writable: true, - enumerable: true - }; - }, - defineProperty(target, methodName, descriptor) { - Object.defineProperty(target.cache, methodName, descriptor); - return true; - }, - deleteProperty(target, methodName) { - delete target.cache[methodName]; - return true; +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; +function representYamlFloat(object, style) { + if (isNaN(object)) { + switch (style) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + } else if (isNegativeZero(object)) { + return "-0.0"; + } + const res = object.toString(10); + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res; +} +function isFloat(object) { + return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || isNegativeZero(object)); +} +var float = new Type("tag:yaml.org,2002:float", { + construct: constructYamlFloat, + defaultStyle: "lowercase", + kind: "scalar", + predicate: isFloat, + represent: representYamlFloat, + resolve: resolveYamlFloat +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/function.ts +function reconstructFunction(code) { + const func2 = new Function(`return ${code}`)(); + if (!(func2 instanceof Function)) { + throw new TypeError(`Expected function but got ${typeof func2}: ${code}`); + } + return func2; +} +var func = new Type("tag:yaml.org,2002:js/function", { + kind: "scalar", + resolve(data) { + if (data === null) { + return false; + } + try { + reconstructFunction(`${data}`); + return true; + } catch (_err) { + return false; + } }, - ownKeys({ scope }) { - return [...endpointMethodsMap.get(scope).keys()]; + construct(data) { + return reconstructFunction(data); }, - set(target, methodName, value) { - return target.cache[methodName] = value; + predicate(object) { + return object instanceof Function; }, - get({ octokit, scope, cache }, methodName) { - if (cache[methodName]) { - return cache[methodName]; - } - const method = endpointMethodsMap.get(scope).get(methodName); - if (!method) { - return void 0; - } - const { endpointDefaults, decorations } = method; - if (decorations) { - cache[methodName] = decorate( - octokit, - scope, - methodName, - endpointDefaults, - decorations - ); - } else { - cache[methodName] = octokit.request.defaults(endpointDefaults); + represent(object) { + return object.toString(); + } +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/int.ts +function isHexCode(c) { + return 48 <= /* 0 */ + c && c <= 57 || 65 <= /* A */ + c && c <= 70 || 97 <= /* a */ + c && c <= 102; +} +function isOctCode(c) { + return 48 <= /* 0 */ + c && c <= 55; +} +function isDecCode(c) { + return 48 <= /* 0 */ + c && c <= 57; +} +function resolveYamlInteger(data) { + const max = data.length; + let index = 0; + let hasDigits = false; + if (!max) return false; + let ch = data[index]; + if (ch === "-" || ch === "+") { + ch = data[++index]; + } + if (ch === "0") { + if (index + 1 === max) return true; + ch = data[++index]; + if (ch === "b") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch !== "0" && ch !== "1") return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "x") { + index++; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== "_"; + } + if (ch === "_") return false; + for (; index < max; index++) { + ch = data[index]; + if (ch === "_") continue; + if (ch === ":") break; + if (!isDecCode(data.charCodeAt(index))) { + return false; } - return cache[methodName]; + hasDigits = true; } -}; -function endpointsToMethods(octokit) { - const newMethods = {}; - for (const scope of endpointMethodsMap.keys()) { - newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); + if (!hasDigits || ch === "_") return false; + if (ch !== ":") return true; + return /^(:[0-5]?[0-9])+$/.test(data.slice(index)); +} +function constructYamlInteger(data) { + let value = data; + const digits = []; + if (value.indexOf("_") !== -1) { + value = value.replace(/_/g, ""); } - return newMethods; + let sign = 1; + let ch = value[0]; + if (ch === "-" || ch === "+") { + if (ch === "-") sign = -1; + value = value.slice(1); + ch = value[0]; + } + if (value === "0") return 0; + if (ch === "0") { + if (value[1] === "b") return sign * parseInt(value.slice(2), 2); + if (value[1] === "x") return sign * parseInt(value, 16); + return sign * parseInt(value, 8); + } + if (value.indexOf(":") !== -1) { + value.split(":").forEach((v) => { + digits.unshift(parseInt(v, 10)); + }); + let valueInt = 0; + let base = 1; + digits.forEach((d) => { + valueInt += d * base; + base *= 60; + }); + return sign * valueInt; + } + return sign * parseInt(value, 10); } -function decorate(octokit, scope, methodName, defaults, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults); - function withDecorations(...args) { - let options = requestWithDefaults.endpoint.merge(...args); - if (decorations.mapToData) { - options = Object.assign({}, options, { - data: options[decorations.mapToData], - [decorations.mapToData]: void 0 - }); - return requestWithDefaults(options); +function isInteger(object) { + return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !isNegativeZero(object); +} +var int = new Type("tag:yaml.org,2002:int", { + construct: constructYamlInteger, + defaultStyle: "decimal", + kind: "scalar", + predicate: isInteger, + represent: { + binary(obj) { + return obj >= 0 ? `0b${obj.toString(2)}` : `-0b${obj.toString(2).slice(1)}`; + }, + octal(obj) { + return obj >= 0 ? `0${obj.toString(8)}` : `-0${obj.toString(8).slice(1)}`; + }, + decimal(obj) { + return obj.toString(10); + }, + hexadecimal(obj) { + return obj >= 0 ? `0x${obj.toString(16).toUpperCase()}` : `-0x${obj.toString(16).toUpperCase().slice(1)}`; } - if (decorations.renamed) { - const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn( - `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` - ); + }, + resolve: resolveYamlInteger, + styleAliases: { + binary: [2, "bin"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"], + octal: [8, "oct"] + } +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/map.ts +var map = new Type("tag:yaml.org,2002:map", { + construct(data) { + return data !== null ? data : {}; + }, + kind: "mapping" +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/merge.ts +function resolveYamlMerge(data) { + return data === "<<" || data === null; +} +var merge2 = new Type("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: resolveYamlMerge +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/nil.ts +function resolveYamlNull(data) { + const max = data.length; + return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL"); +} +function constructYamlNull() { + return null; +} +function isNull(object) { + return object === null; +} +var nil = new Type("tag:yaml.org,2002:null", { + construct: constructYamlNull, + defaultStyle: "lowercase", + kind: "scalar", + predicate: isNull, + represent: { + canonical() { + return "~"; + }, + lowercase() { + return "null"; + }, + uppercase() { + return "NULL"; + }, + camelcase() { + return "Null"; } - if (decorations.deprecated) { - octokit.log.warn(decorations.deprecated); + }, + resolve: resolveYamlNull +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/omap.ts +var { hasOwn: hasOwn2 } = Object; +var _toString = Object.prototype.toString; +function resolveYamlOmap(data) { + const objectKeys = []; + let pairKey = ""; + let pairHasKey = false; + for (const pair of data) { + pairHasKey = false; + if (_toString.call(pair) !== "[object Object]") return false; + for (pairKey in pair) { + if (hasOwn2(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + if (!pairHasKey) return false; + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + return true; +} +var omap = new Type("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: resolveYamlOmap +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/pairs.ts +var _toString2 = Object.prototype.toString; +function resolveYamlPairs(data) { + const result = Array.from({ length: data.length }); + for (const [index, pair] of data.entries()) { + if (_toString2.call(pair) !== "[object Object]") return false; + const keys = Object.keys(pair); + if (keys.length !== 1) return false; + result[index] = [keys[0], pair[keys[0]]]; + } + return true; +} +function constructYamlPairs(data) { + if (data === null) return []; + const result = Array.from({ length: data.length }); + for (let index = 0; index < data.length; index += 1) { + const pair = data[index]; + const keys = Object.keys(pair); + result[index] = [keys[0], pair[keys[0]]]; + } + return result; +} +var pairs = new Type("tag:yaml.org,2002:pairs", { + construct: constructYamlPairs, + kind: "sequence", + resolve: resolveYamlPairs +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/regexp.ts +var REGEXP = /^\/(?[\s\S]+)\/(?[gismuy]*)$/; +var regexp = new Type("tag:yaml.org,2002:js/regexp", { + kind: "scalar", + resolve(data) { + if (data === null || !data.length) { + return false; } - if (decorations.renamedParameters) { - const options2 = requestWithDefaults.endpoint.merge(...args); - for (const [name, alias] of Object.entries( - decorations.renamedParameters - )) { - if (name in options2) { - octokit.log.warn( - `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` - ); - if (!(alias in options2)) { - options2[alias] = options2[name]; - } - delete options2[name]; - } + const regexp2 = `${data}`; + if (regexp2.charAt(0) === "/") { + if (!REGEXP.test(data)) { + return false; + } + const modifiers = [...regexp2.match(REGEXP)?.groups?.modifiers ?? ""]; + if (new Set(modifiers).size < modifiers.length) { + return false; } - return requestWithDefaults(options2); } - return requestWithDefaults(...args); + return true; + }, + construct(data) { + const { regexp: regexp2 = `${data}`, modifiers = "" } = `${data}`.match(REGEXP)?.groups ?? {}; + return new RegExp(regexp2, modifiers); + }, + predicate(object) { + return object instanceof RegExp; + }, + represent(object) { + return object.toString(); } - return Object.assign(withDecorations, requestWithDefaults); -} +}); -// npm/node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - rest: api - }; +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/seq.ts +var seq = new Type("tag:yaml.org,2002:seq", { + construct(data) { + return data !== null ? data : []; + }, + kind: "sequence" +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/set.ts +var { hasOwn: hasOwn3 } = Object; +function resolveYamlSet(data) { + if (data === null) return true; + for (const key in data) { + if (hasOwn3(data, key)) { + if (data[key] !== null) return false; + } + } + return true; } -restEndpointMethods.VERSION = VERSION7; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit); - return { - ...api, - rest: api - }; +function constructYamlSet(data) { + return data !== null ? data : {}; } -legacyRestEndpointMethods.VERSION = VERSION7; +var set = new Type("tag:yaml.org,2002:set", { + construct: constructYamlSet, + kind: "mapping", + resolve: resolveYamlSet +}); -// npm/node_modules/@octokit/rest/dist-src/version.js -var VERSION8 = "21.0.1"; +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/str.ts +var str = new Type("tag:yaml.org,2002:str", { + construct(data) { + return data !== null ? data : ""; + }, + kind: "scalar" +}); -// npm/node_modules/@octokit/rest/dist-src/index.js -var Octokit2 = Octokit.plugin(requestLog, legacyRestEndpointMethods, paginateRest).defaults( - { - userAgent: `octokit-rest.js/${VERSION8}` - } +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/timestamp.ts +var YAML_DATE_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" + // [3] day ); +var YAML_TIMESTAMP_REGEXP = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" + // [11] tz_minute +); +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} +function constructYamlTimestamp(data) { + let match2 = YAML_DATE_REGEXP.exec(data); + if (match2 === null) match2 = YAML_TIMESTAMP_REGEXP.exec(data); + if (match2 === null) throw new Error("Date resolve error"); + const year = +match2[1]; + const month = +match2[2] - 1; + const day = +match2[3]; + if (!match2[4]) { + return new Date(Date.UTC(year, month, day)); + } + const hour = +match2[4]; + const minute = +match2[5]; + const second = +match2[6]; + let fraction = 0; + if (match2[7]) { + let partFraction = match2[7].slice(0, 3); + while (partFraction.length < 3) { + partFraction += "0"; + } + fraction = +partFraction; + } + let delta = null; + if (match2[9] && match2[10]) { + const tzHour = +match2[10]; + const tzMinute = +(match2[11] || 0); + delta = (tzHour * 60 + tzMinute) * 6e4; + if (match2[9] === "-") delta = -delta; + } + const date = new Date( + Date.UTC(year, month, day, hour, minute, second, fraction) + ); + if (delta) date.setTime(date.getTime() - delta); + return date; +} +function representYamlTimestamp(date) { + return date.toISOString(); +} +var timestamp = new Type("tag:yaml.org,2002:timestamp", { + construct: constructYamlTimestamp, + instanceOf: Date, + kind: "scalar", + represent: representYamlTimestamp, + resolve: resolveYamlTimestamp +}); -// npm/src/github.ts -var import_process = __toESM(require("process")); -var createOctokitForAction = (token) => { - const baseUrl = import_process.default.env.GITHUB_API_URL ?? "https://api.github.com"; - return new Octokit2({ - auth: token, - baseUrl - }); -}; -var fetchWorkflow = async (octokit, owner, repo, runId, runAttempt) => { - const workflow = await octokit.rest.actions.getWorkflowRunAttempt({ - owner, - repo, - run_id: runId, - attempt_number: runAttempt - }); - return workflow.data; -}; -var fetchWorkflowRunJobs = async (octokit, owner, repo, runId, runAttempt) => { - const workflowJob = await octokit.rest.actions.listJobsForWorkflowRunAttempt({ - owner, - repo, - run_id: runId, - attempt_number: runAttempt, - per_page: 100 - }); - return workflowJob.data.jobs; -}; +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_type/undefined.ts +var undefinedType = new Type("tag:yaml.org,2002:js/undefined", { + kind: "scalar", + resolve() { + return true; + }, + construct() { + return void 0; + }, + predicate(object) { + return typeof object === "undefined"; + }, + represent() { + return ""; + } +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/schema/failsafe.ts +var FAILSAFE_SCHEMA = new Schema({ + explicit: [str, seq, map] +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/schema/json.ts +var JSON_SCHEMA = new Schema({ + implicit: [nil, bool, int, float], + include: [FAILSAFE_SCHEMA] +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/schema/core.ts +var CORE_SCHEMA = new Schema({ + include: [JSON_SCHEMA] +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/schema/default.ts +var DEFAULT_SCHEMA = new Schema({ + explicit: [binary, omap, pairs, set], + implicit: [timestamp, merge2], + include: [CORE_SCHEMA] +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/schema/extended.ts +var EXTENDED_SCHEMA = new Schema({ + explicit: [regexp, undefinedType], + include: [DEFAULT_SCHEMA] +}); + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_loader/loader.ts +var { hasOwn: hasOwn4 } = Object; +function simpleEscapeSequence(c) { + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; +} +var simpleEscapeCheck = Array.from({ length: 256 }); +var simpleEscapeMap = Array.from({ length: 256 }); +for (let i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_dumper/dumper_state.ts +var { hasOwn: hasOwn5 } = Object; + +// npm/src/deps/jsr.io/@std/yaml/0.224.3/_dumper/dumper.ts +var { hasOwn: hasOwn6 } = Object; +var ESCAPE_SEQUENCES = {}; +ESCAPE_SEQUENCES[0] = "\\0"; +ESCAPE_SEQUENCES[7] = "\\a"; +ESCAPE_SEQUENCES[8] = "\\b"; +ESCAPE_SEQUENCES[9] = "\\t"; +ESCAPE_SEQUENCES[10] = "\\n"; +ESCAPE_SEQUENCES[11] = "\\v"; +ESCAPE_SEQUENCES[12] = "\\f"; +ESCAPE_SEQUENCES[13] = "\\r"; +ESCAPE_SEQUENCES[27] = "\\e"; +ESCAPE_SEQUENCES[34] = '\\"'; +ESCAPE_SEQUENCES[92] = "\\\\"; +ESCAPE_SEQUENCES[133] = "\\N"; +ESCAPE_SEQUENCES[160] = "\\_"; +ESCAPE_SEQUENCES[8232] = "\\L"; +ESCAPE_SEQUENCES[8233] = "\\P"; // npm/src/post.ts var main = async () => { - const token = (0, import_core2.getInput)("github-token", { required: true }); - const showWaitingRunner = (0, import_core2.getBooleanInput)("show-waiting-runner"); - const octokit = createOctokitForAction(token); - (0, import_core2.info)("Wait for workflow API result stability..."); + const token = (0, import_core4.getInput)("github-token", { required: true }); + const showWaitingRunner = (0, import_core4.getBooleanInput)("show-waiting-runner"); + const client = new Github({ token }); + (0, import_core4.info)("Wait for workflow API result stability..."); await (0, import_promises.setTimeout)(1e3); - (0, import_core2.info)("Fetch workflow..."); - const runAttempt = import_process2.default.env.GITHUB_RUN_ATTEMPT ? Number(import_process2.default.env.GITHUB_RUN_ATTEMPT) : 1; - const workflow = await fetchWorkflow( - octokit, - github.context.repo.owner, - github.context.repo.repo, - github.context.runId, - runAttempt - ); - (0, import_core2.debug)(JSON.stringify(workflow, null, 2)); - (0, import_core2.info)("Fetch workflow_job..."); - const workflowJobs = await fetchWorkflowRunJobs( - octokit, + (0, import_core4.info)("Fetch workflow..."); + const runAttempt = import_node_process.default.env.GITHUB_RUN_ATTEMPT ? Number(import_node_process.default.env.GITHUB_RUN_ATTEMPT) : 1; + const workflowRun = await client.fetchWorkflowRun( github.context.repo.owner, github.context.repo.repo, github.context.runId, runAttempt ); - (0, import_core2.debug)(JSON.stringify(workflowJobs, null, 2)); - (0, import_core2.info)("Create gantt mermaid diagram..."); - const gantt = createMermaid(workflow, workflowJobs, { showWaitingRunner }); - await import_core2.summary.addRaw(gantt).write(); - (0, import_core2.debug)(gantt); - (0, import_core2.info)("Complete!"); + (0, import_core4.debug)(JSON.stringify(workflowRun, null, 2)); + (0, import_core4.info)("Fetch workflow_job..."); + const workflowJobs = await client.fetchWorkflowJobs([workflowRun]); + (0, import_core4.debug)(JSON.stringify(workflowJobs, null, 2)); + (0, import_core4.info)("Create gantt mermaid diagram..."); + const gantt = createMermaid(workflowRun, workflowJobs, { showWaitingRunner }); + await import_core4.summary.addRaw(gantt).write(); + (0, import_core4.debug)(gantt); + (0, import_core4.info)("Complete!"); }; main(); /*! Bundled license information: diff --git a/scripts/build.ts b/scripts/build.ts index 47e19f0..0194553 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -1,4 +1,4 @@ -import { build, emptyDir } from "https://deno.land/x/dnt@0.40.0/mod.ts"; +import { build, emptyDir } from "jsr:@deno/dnt@0.41.3"; import * as esbuild from "npm:esbuild@0.23.0"; console.debug("Start dnt ..."); diff --git a/src/github.ts b/src/github.ts index db9f657..c95b5bc 100644 --- a/src/github.ts +++ b/src/github.ts @@ -1,6 +1,6 @@ // @octokit/rest@20 dropped support for node16. However, node16 bundled in actions/runner and still supported. // So, we use @octokit/rest@19. -import { Octokit, RestEndpointMethodTypes } from "npm:@octokit/rest@21.0.1"; +import { Octokit, RestEndpointMethodTypes } from "npm:@octokit/rest@^21.0.0"; import process from "node:process"; export type Workflow = diff --git a/src/post.ts b/src/post.ts index 15e8e6a..764d8d9 100644 --- a/src/post.ts +++ b/src/post.ts @@ -9,7 +9,7 @@ import { } from "npm:@actions/core@1.10.1"; import * as github from "npm:@actions/github@6.0.0"; import { createMermaid } from "./workflow_gantt.ts"; -import { Github } from "@kesin11/gha-utils"; +import { Github } from "jsr:@kesin11/gha-utils"; const main = async () => { const token = getInput("github-token", { required: true });